<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael Kolb Fulda&#187; Web Engineering</title>
	<atom:link href="http://www.michael-kolb.co.uk/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michael-kolb.co.uk</link>
	<description>Web Engineering</description>
	<lastBuildDate>Mon, 01 Mar 2010 05:58:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Authinfo for .de domains</title>
		<link>http://www.michael-kolb.co.uk/webhosting/authinfo-for-de-domains/</link>
		<comments>http://www.michael-kolb.co.uk/webhosting/authinfo-for-de-domains/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 13:06:18 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=712</guid>
		<description><![CDATA[Since december 2008, the DENIC provides an authinfo for domain transfers. This method is known from a lot top level domains. Befor december, the DENIC provided an asynchronous transfer method, which doesn&#8217;t need an authinfo.
Firstly, the registration agency allows to use both methods parallel. But the authinfo method is much more secure. It decreases the [...]]]></description>
			<content:encoded><![CDATA[<p>Since december 2008, the DENIC provides an authinfo for domain transfers. This method is known from a lot top level domains. Befor december, the DENIC provided an asynchronous transfer method, which doesn&#8217;t need an authinfo.</p>
<p>Firstly, the registration agency allows to use both methods parallel. But the authinfo method is much more <a href="http://www.michael-kolb.co.uk/tag/security/">secure</a>. It decreases the risk to transfer domains to unauthorized persons, because of the generated authinfo password.</p>
<p><strong>How does it work:</strong><br />
<span id="more-712"></span><br />
If you are the owner of a .de domain and want to transfer it from a <a href="http://www.michael-kolb.co.uk/tag/hosting/">webhoster</a> to another, than you have to follow these steps:</p>
<ul>
<li>Send your present hoster a notice of cancellation with the intention to do a provider change. The present hoster needs this sheet to get the admission for unlocking the domain.</li>
<li>The present hoster will send you an automatic generated password (authinfo)</li>
<li>Take the order at the future contractor with the note, that the domain isn&#8217;t a new one but a transfer domain</li>
<li>Put the authinfo code wich got from present hoster into the appropriate order field of the future hoster.</li>
<li>The transfer will be done, when the two passwords matches</li>
</ul>
<p><img src="http://www.michael-kolb.co.uk/wp-content/uploads/2008/12/authinfo_1_scaled_2.jpg" alt="authinfo_1_scaled_2" title="authinfo_1_scaled_2" width="450" height="326" class="alignnone size-full wp-image-728" /><br /><i>Image by DENIC</i></p>
<p>Helpful links:
<ul>
<li>
<a href="http://www.denic.de/de/denic/presse/press_91.html" target="_blank">http://www.denic.de/de/denic/presse/press_91.html</a> [german]
</li>
<li>
<a href="http://www.denic.de/en/denic/presse/press_91.html" target="_blank">http://www.denic.de/en/denic/presse/press_91.html</a> [english]
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/webhosting/authinfo-for-de-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing ssh port to improve security</title>
		<link>http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/</link>
		<comments>http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:55:44 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=327</guid>
		<description><![CDATA[For security reasons, it&#8217;s advisable to change the ssh standard port 22 into something else. So you will get less attacks to sshd. This improves the security for your server. Furthermore, you should block root from connecting via ssh.
Open your /etc/ssh/sshd_config
Changing the port:

# This is the sshd server system-wide configuration file.  See sshd(8)
# for [...]]]></description>
			<content:encoded><![CDATA[<p>For <a href="http://www.michael-kolb.co.uk/tag/security">security</a> reasons, it&#8217;s advisable to change the ssh standard port 22 into something else. So you will get less attacks to sshd. This improves the security for your server. Furthermore, you should block root from connecting via ssh.</p>
<p>Open your /etc/ssh/sshd_config<br />
Changing the port:<br />
<code><br />
# This is the sshd server system-wide configuration file.  See sshd(8)<br />
# for more information.</code></p>
<p># change the port configuration &#8211; for example to 2233<br />
Port 2233<br />
Protocol 2</p>
<p><span id="more-327"></span></p>
<p>And blocking user root<br />
<code><br />
#<br />
PermitRootLogin without-password<br />
PermitRootLogin no<br />
#<br />
</code><br />
You need to restart the sshd <a href="http://www.michael-kolb.co.uk/tag/script/">script</a> with <strong>/etc/init.d/sshd restart</strong> Please stay logged in as root, before you&#8217;ve tested the new ssh &#8211; connect with a second console.</p>
<p>Now create an user account with lower permissions than root. Use this account to connect your server via ssh, followed by the &#8220;su&#8221; command to get root permissions.</p>
<p><code><br />
useradd -u 999 -g 100 remotessh -d /home/remotessh -s /bin/bash<br />
</code></p>
<p>Connecting your server with the new port:<br />
<code><br />
ssh -P 2233 yourserver.com -l remotessh<br />
</code></p>
<p>Setting up a firewall with iptables to improve systems security will bei shown in this <a href="http://www.michael-kolb.co.uk/linuxdaemons/scripting-a-firewall-with-iptables/" alt="iptables" target="_top">article</a></p>
<p><strong>Helpful links:</strong></p>
<ul>
<li>
Using keychains to avoid typing passwords again and again.<br />
<a href="http://blog.synatic.net/2008/3/29/easy-ssh-authentication-with-keychain" target="_blank">http://blog.synatic.net/2008/3/29/easy-ssh-authentication-with-keychain</a>.
</li>
<li>
A nice how-to for creating strong passwords:<br />
<a href="http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/" target="_blank">http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Scripting a firewall with iptables</title>
		<link>http://www.michael-kolb.co.uk/linuxdaemons/scripting-a-firewall-with-iptables/</link>
		<comments>http://www.michael-kolb.co.uk/linuxdaemons/scripting-a-firewall-with-iptables/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 17:42:59 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=61</guid>
		<description><![CDATA[IPTables is a text based frontend for the ipchains kernel module. The ipchains support is compiled into most kernels of todays distributions. With iptables you don&#8217;t have to use a graphical tool. So it&#8217;s very suitable for scritpting.
First thing to do is installing neccessary packages, for Ubuntu / Debian:
apt-get update
apt-get install iptables
When the package is [...]]]></description>
			<content:encoded><![CDATA[<p>IPTables is a text based frontend for the ipchains kernel module. The ipchains support is compiled into most kernels of todays distributions. With iptables you don&#8217;t have to use a graphical tool. So it&#8217;s very suitable for <a href="http://www.michael-kolb.co.uk/tag/script/">scritpting</a>.</p>
<p>First thing to do is installing neccessary packages, for Ubuntu / Debian:<br />
<code>apt-get update<br />
apt-get install iptables</code></p>
<p>When the package is installed, create a file inside /etc/init.d/ called iptables (or whatever you want). Copy paste the lines below into.</p>
<p><span id="more-61"></span></p>
<p><code><br />
########################################<br />
#!/bin/sh<br />
# iptables start/stop script<br />
# location /etc/init.d/iptables<br />
########################################</p>
<p>PATH=/bin:/sbin:/usr/bin:/usr/sbin<br />
TABLEBIN=/sbin/iptables</p>
<p>#<br />
# INPUT - SERVICES<br />
#<br />
IN_TCP_SERVICES="80 443 25 110 995 21" # http https smtp pop3 SSL/TLS ftp<br />
IN_UDP_SERVICES=""</p>
<p>#<br />
# OUTPUT - SERVICES<br />
#<br />
OUT_TCP_SERVICES="80 443 25 43 2703 21" # http https smtp whois razor ftp<br />
OUT_UDP_SERVICES="53 123" # DNS ntp</p>
<p>if ! [ -x $TABLEBIN ]; then<br />
echo "IPTABLES does not exists"<br />
exit 0<br />
fi<br />
</code></p>
<p>With the INPUT/OUTPUT section, you&#8217;re able to define your services like http or smtp for remote access. Chmod file to 755 and ensure root to be the owner.</p>
<p><code><br />
chmod 755 /etc/init.d/iptables<br />
chown root:root /etc/init.d/iptables</code></p>
<p>Check and try the script. If iptables isn&#8217;t installed correctly, you wil get an error statement. Next step, calling iptables statements. Append following lines into the iptables script:</p>
<p><code><br />
#<br />
# start firewall<br />
#<br />
fw_start ()<br />
{<br />
# deny all<br />
$TABLEBIN -P INPUT DROP<br />
$TABLEBIN -P OUTPUT DROP<br />
# common<br />
$TABLEBIN -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br />
$TABLEBIN -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</p>
<p># allow mysql from special IP adresses<br />
$TABLEBIN -A INPUT -p tcp -s  xxx.xxx.xxx.xxx --dport 3306 -j ACCEPT # MYSQL for clients<br />
$TABLEBIN -A OUTPUT -p tcp -s xxx.xxx.xxx.xxx --dport 3306 -j ACCEPT # MYSQL for clients</p>
<p># allow always<br />
$TABLEBIN -A INPUT -p tcp --dport 2222 -j ACCEPT # ssh on port 2233<br />
$TABLEBIN -A INPUT -i lo -j ACCEPT<br />
$TABLEBIN -I INPUT -s 127.0.0.1 -j ACCEPT<br />
$TABLEBIN -I OUTPUT -s 127.0.0.1 -j ACCEPT</p>
<p># deny special bad ip adresses<br />
$TABLEBIN -I INPUT -s xxx.xxx.xxx.xxx -j DROP # deny, because of ...<br />
$TABLEBIN -I INPUT -s xxx.xxx.xxx.xxx -j DROP # deny, because of ...<br />
$TABLEBIN -I INPUT -s xxx.xxx.xxx.xxx -j DROP # deny, because of ...</p>
<p># INPUTS<br />
if [ -n "$IN_TCP_SERVICES" ] ; then<br />
for PORT in $IN_TCP_SERVICES; do<br />
$TABLEBIN -A INPUT -p tcp --dport ${PORT} -j ACCEPT<br />
done<br />
fi</p>
<p>if [ -n "$IN_UDP_SERVICES" ] ; then<br />
for PORT in $IN_UDP_SERVICES; do<br />
$TABLEBIN -A INPUT -p udp --dport ${PORT} -j ACCEPT<br />
done<br />
fi</p>
<p># OUTPUTS<br />
if [ -n "$OUT_TCP_SERVICES" ] ; then<br />
for PORT in $OUT_TCP_SERVICES; do<br />
$TABLEBIN -A OUTPUT -p tcp --dport ${PORT} -j ACCEPT<br />
done<br />
fi</p>
<p>if [ -n "$OUT_UDP_SERVICES" ] ; then<br />
for PORT in $OUT_UDP_SERVICES; do<br />
$TABLEBIN -A OUTPUT -p udp --dport ${PORT} -j ACCEPT<br />
done<br />
fi<br />
}<br />
</code></p>
<p>The <a href="http://www.michael-kolb.co.uk/linuxdaemons/changing-ssh-port/" target="_top" alt="ssh port">ssh port</a> is binded to another one, because of improving security.<br />
The last step to complete the script is the stopping call:</p>
<p><code><br />
#<br />
# stop firewall<br />
#<br />
fw_stop ()<br />
{<br />
$TABLEBIN -F<br />
$TABLEBIN -t nat -F<br />
$TABLEBIN -t mangle -F<br />
$TABLEBIN -P INPUT ACCEPT<br />
$TABLEBIN -P FORWARD ACCEPT<br />
$TABLEBIN -P OUTPUT ACCEPT<br />
}</p>
<p>case "$1" in<br />
start)<br />
echo -n "starting firewall.."<br />
fw_stop<br />
fw_start<br />
echo "done."<br />
;;<br />
stop)<br />
echo -n "stopping firewall.."<br />
fw_stop<br />
echo "done."<br />
;;<br />
*)<br />
echo "Usage: $0 {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
exit 0<br />
</code></p>
<p>Now you start your iptables script with<br />
<strong>/etc/init.d/iptables start<br />
/etc/init.d/iptables stop<br />
</strong></p>
<p>To start the <a href="http://www.michael-kolb.co.uk/tag/script/">script</a> on booting process, put into the runlevel configuration (Debian/Ubuntu):</p>
<p><code><br />
update-rc.d timWall start 40 S . stop 89 0 6 .<br />
</code></p>
<p>Be careful!! Test it before manually, because you could block yourself out of the system. Firewall architecture with a DMZ:</p>
<p><img class="alignnone size-medium wp-image-365" title="reseau-dmz" src="http://www.michael-kolb.co.uk/wp-content/uploads/2008/11/reseau-dmz.jpg" alt="Firewall with DMZ" width="400" height="400" /><br />
Source: <a href="http://www.basic-security.com/MEDIA/US/RESEAU-DMZ.jpg" target="_blank">http://www.basic-security.com/MEDIA/US/RESEAU-DMZ.jpg</a></p>
<div class="download_banner">
Note: There is a file embedded within this post, please visit this post to download the file.</div>
<p><strong>Useful links:</strong></p>
<ul>
<li><em>(iptables &#8211; Die Firewall des Kernel 2.4 von Wolfgang Kinkeldei)</em><br />
<a href="http://www.pro-linux.de/NB3/artikel/2/print/761/6,6iptables-die-firewall-des-kernels-24.html" target="_blank">http://www.pro-linux.de/NB3/artikel/2/print/761/6,6iptables-die-firewall-des-kernels-24.html</a></li>
<li> <em>(iptables script generator from Tarjei Mandt)</em><br />
<a href="http://www.mista.nu/iptables/" target="_blank">http://www.mista.nu/iptables/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/linuxdaemons/scripting-a-firewall-with-iptables/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
