<?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; Linux daemons</title>
	<atom:link href="http://www.michael-kolb.co.uk/category/linuxdaemons/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>How to use logrotate by linux</title>
		<link>http://www.michael-kolb.co.uk/webhosting/how-to-use-logrotate-by-linux/</link>
		<comments>http://www.michael-kolb.co.uk/webhosting/how-to-use-logrotate-by-linux/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 06:30:31 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[daemon hosting linux]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=1393</guid>
		<description><![CDATA[In a server environment it&#8217;s quite important to keep the size of log files in track. Everyone knows the problem of increasing file sizes in this matter. Therefore the logrotate daemon may help you to solve this problem. Files are rotated ore removed in a defined time slot to gzipped files for X times. You [...]]]></description>
			<content:encoded><![CDATA[<p>In a server environment it&#8217;s quite important to keep the size of log files in track. Everyone knows the problem of increasing file sizes in this matter. Therefore the logrotate daemon may help you to solve this problem. Files are rotated ore removed in a defined time slot to gzipped files for X times. You can find the configuration in /etc/logrotate.d.</p>
<p>In this directory you can find already given config files for some linux services.</p>
<p>This is an example of the samba logrotate in /etc/logrotate.d/samba:<br />
<code><br />
/var/log/samba/log.smbd {<br />
        weekly<br />
        missingok<br />
        rotate 7<br />
        postrotate<br />
                invoke-rc.d --quiet samba reload > /dev/null<br />
        endscript<br />
        compress<br />
        notifempty<br />
}<br />
</code></p>
<p><span id="more-1393"></span></p>
<p>The samba log file is rotated weekly and 7 rotated files will be compressed and archived. The eighth file is removed. After the rotation process the samba daemon is reloaded.</p>
<p><strong>compress </strong><br />
This is used to compress the rotated log file with gzip. </p>
<p><strong>nocompress </strong><br />
This is used when you don&#8217;t want to compress rotated log files. </p>
<p><strong>copytruncate</strong><br />
This is used when processes are still writing information to open log files. This option copies the active log file to a backup and truncates the active log file. </p>
<p><strong>nocopytruncate</strong><br />
This copies the log files to backup, but the open log file is not truncated. </p>
<p><strong>create mode owner group</strong><br />
This rotates the log file and creates a new log file with the specified permissions, owner, and group. The default is to use the same mode, owner, and group as the original file. </p>
<p><strong>nocreate</strong><br />
This prevents the creation of a new log file. </p>
<p><strong>delaycompress</strong><br />
When used with the compress option, the rotated log file is not compressed until the next time it is cycled. </p>
<p><strong>nodelaycompress</strong><br />
This overrides delaycompress. The log file is compressed when it is cycled. </p>
<p><strong>errors address</strong><br />
This mails logrotate errors to an address. </p>
<p><strong>ifempty</strong><br />
With this, the log file is rotated even if it is empty. This is the default for logrotate. </p>
<p><strong>notifempty</strong><br />
This does not rotate the log file if it is empty. </p>
<p><strong>mail address</strong><br />
This mails log files that are cycled to an address. When mail log files are cycled, they are effectively removed from the system. </p>
<p><strong>nomail</strong><br />
When mail log files are cycled, a copy is not mailed. </p>
<p><strong>olddir directory</strong><br />
With this, cycled log files are kept in the specified directory. This directory must be on the same filesystem as the current log files. </p>
<p><strong>noolddir</strong><br />
Cycled log files are kept in the same directory as the current log files. </p>
<p><strong>prerotate/endscript</strong><br />
These are statements that enclose commands to be executed prior to a log file being rotated. The prerotate and endscript keywords must appear on a line by themselves. </p>
<p><strong>postrotate/endscript</strong><br />
These are statements that enclose commands to be executed after a log file has been rotated. The postrotate and endscript keywords must appear on a line by themselves. </p>
<p><strong>daily</strong><br />
This is used to rotate log files daily. </p>
<p><strong>weekly</strong><br />
This is used to rotate log files weekly. </p>
<p><strong>monthly</strong><br />
This is used to rotate log files monthly. </p>
<p><strong>rotate count</strong><br />
This specifies the number of times to rotate a file before it is deleted. A count of 0 (zero) means no copies are retained. A count of 5 means five copies are retained. </p>
<p><strong>tabootext [+] list</strong><br />
This directs logrotate to not rotate files with the specified extension. The default list of extensions is .rpm-orig, .rpmsave, v, and ~. </p>
<p><strong>size size</strong><br />
With this, the log file is rotated when the specified size is reached. Size may be specified in bytes (default), kilobytes (sizek), or megabytes (sizem).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/webhosting/how-to-use-logrotate-by-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable USB support in VirtualBox on a linux host</title>
		<link>http://www.michael-kolb.co.uk/linuxbasics/how-to-enable-usb-support-in-virtualbox-on-a-linux-host/</link>
		<comments>http://www.michael-kolb.co.uk/linuxbasics/how-to-enable-usb-support-in-virtualbox-on-a-linux-host/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 10:27:46 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Basics]]></category>
		<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=1146</guid>
		<description><![CDATA[There is a common problem to get USB support running in VirtualBox on a debian or ubuntu linux host system. If there is a Windows XP (maybe also other system) installed as the guest system, the USB devices will be shown in the VirtualBox menue &#8211; but they are disabled. The devices are recognized but [...]]]></description>
			<content:encoded><![CDATA[<p>There is a common problem to get USB support running in VirtualBox on a debian or ubuntu linux host system. If there is a Windows XP (maybe also other system) installed as the guest system, the USB devices will be shown in the VirtualBox menue &#8211; but they are disabled. The devices are recognized but the reason for the disabled function is the unsufficient permission.</p>
<p>In this post, I will explain how to solve this problem by a few tricks.</p>
<p><span id="more-1146"></span></p>
<p>You need to open the file mountkernfs.sh<br />
<code><br />
# vi /etc/init.d/mountkernfs.sh<br />
</code></p>
<p>Inside this file, look for this line:<br />
<code><br />
domount proc "" /proc proc -onodev,noexec,nosuid<br />
</code></p>
<p>Please insert directly below the line above this following statement. You need to replace xxx with the groupID of the vboxuser. You can find this ID in your /etc/groups file<br />
<code><br />
domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid,devgid=xxx,devmode=664<br />
</code></p>
<p>Furthermore, open your fstab file:<br />
<code><br />
# vi /etc/fstab<br />
</code></p>
<p>and add this line as the very first statement. Replace xxx like above.<br />
<code><br />
none /proc/bus/usb usbfs auto,busgid=122,busmode=0775,devgid=xxx,devmode=0664 0 0<br />
</code></p>
<p>That&#8217;s it. Have a lot of fun. Please don&#8217;t hestitate to add any comments to this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/linuxbasics/how-to-enable-usb-support-in-virtualbox-on-a-linux-host/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>ProFTPd authentification with MySQL</title>
		<link>http://www.michael-kolb.co.uk/webhosting/proftpd-authentification-with-mysql/</link>
		<comments>http://www.michael-kolb.co.uk/webhosting/proftpd-authentification-with-mysql/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 07:06:11 +0000</pubDate>
		<dc:creator>mk_michael</dc:creator>
				<category><![CDATA[Linux Daemons]]></category>
		<category><![CDATA[Webhosting]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.michael-kolb.co.uk/?p=69</guid>
		<description><![CDATA[It&#8217;s very helpful to use the mysql authentification for proftpd. Especially if you manage a quite number of users. So you&#8217;re able to use a central database which manages the accounts.



First thing you need is an appropriate mysql schema that belongs your needs. This is my example:

CREATE TABLE ftp_users (
  username varchar(60) binary default [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s very helpful to use the <a href="http://www.michael-kolb.co.uk/tag/mysql">mysql</a> authentification for proftpd. Especially if you manage a quite number of users. So you&#8217;re able to use a central database which manages the accounts.</p>
<p><img class="size-medium wp-image-202 aligncenter"  src="http://www.michael-kolb.co.uk/wp-content/uploads/2008/12/proftpd.jpg" alt="proftpd with mysql" title="proftpd with mysql" width="301" height="241" class="alignnone size-medium wp-image-505" /></p>
<p><span id="more-69"></span></p>
<p>
First thing you need is an appropriate <a href="http://www.michael-kolb.co.uk/tag/mysql">mysql</a> schema that belongs your needs. This is my example:<br />
<br />
<code>CREATE TABLE ftp_users (<br />
  username varchar(60) binary default NULL,<br />
  uid int(11) default NULL,<br />
  gid int(11) default NULL,<br />
  password varchar(30) default NULL,<br />
  homedir varchar(250) default NULL,<br />
  count int(11) default NULL,<br />
  ui bigint(20) NOT NULL auto_increment,<br />
  shell varchar(60) default NULL,<br />
  last datetime default NULL,<br />
  allow char(1) default NULL,<br />
  PRIMARY KEY  (ui)<br />
) TYPE=ISAM PACK_KEYS=1;<br />
<br />
CREATE TABLE xfer_stat (<br />
  username tinytext,<br />
  filename text,<br />
  size bigint(20) default NULL,<br />
  host tinytext,<br />
  ip tinytext,<br />
  action tinytext,<br />
  durability tinytext,<br />
  local_time datetime default NULL,<br />
  success char(1) default NULL,<br />
  ui bigint(20) NOT NULL auto_increment,<br />
  PRIMARY KEY  (ui)<br />
) TYPE=MyISAM;<br />
</code></p>
<p>
Be sure to have installed all required <a href="http://www.michael-kolb.co.uk/tag/linux/">linux</a> packages:<br />
</p>
<p><code>apt-get -y install mysql-client-5.0<br />
apt-get -y install mysql-server-5.0<br />
apt-get -y install mysql-common<br />
apt-get -y install proftpd-mysql</code></p>
<p>Last thing to do is adapting the /etc/proftpd.conf for acessing <a href="http://www.michael-kolb.co.uk/tag/mysql">mysql</a> tables. You will find the lines at end of the configuration file. Please insert your passwords:</p>
<p><code><br />
DefaultRoot ~<br />
RequireValidShell off<br />
<br />
SQLAuthTypes            Plaintext Crypt<br />
SQLAuthenticate         users* groups*<br />
SQLConnectInfo          mysqluser@127.0.0.1 mysqluser mysqlpassword<br />
SQLUserInfo               ftp_users username password uid gid homedir shell<br />
SQLGroupInfo             ftp_groups groupname gid members<br />
SQLUserWhereClause      "login_enabled = 'Y'"<br />
<br />
SQLLogFile /var/log/ftp/proftpd.sql.log<br />
<br />
SQLLog PASS login<br />
SQLNamedQuery login UPDATE "last_login=now(), login_count=login_count+1 WHERE username='%u'" ftp_users<br />
<br />
SQLLog RETR download<br />
SQLNamedQuery download UPDATE "down_count=down_count+1, down_bytes=down_bytes+%b WHERE username='%u'" ftp_users<br />
<br />
SQLLog STOR upload<br />
SQLNamedQuery upload UPDATE "up_count=up_count+1, up_bytes=up_bytes+%b WHERE username='%u'" ftp_users<br />
</code></p>
<p>Helpful link:<br />
<a href="http://www.proftpd.de/HowTo-SQL.29.0.html" target="_blank">http://www.proftpd.de/HowTo-SQL.29.0.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michael-kolb.co.uk/webhosting/proftpd-authentification-with-mysql/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>
