<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Iptables - Example Firewall Rulesets</title>
	<atom:link href="http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-example-rulesets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-example-rulesets/</link>
	<description></description>
	<pubDate>Sun, 23 Nov 2008 12:04:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: freeroute</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-example-rulesets/#comment-81015</link>
		<dc:creator>freeroute</dc:creator>
		<pubDate>Tue, 09 Oct 2007 18:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=21#comment-81015</guid>
		<description>Hello James,
I tried your simple firewall on my box (Debian). 
Everyhing ok. But I have a little problem. I would like to allow inbound ssh traffic,too.
It doesn't work. Could you help me?


## SSH
# Allow ssh outbound.
iptables -A INPUT  -i $IFACE -p tcp --dport 22 -m state --state NEW -j ACCEPT #allow ssh in
iptables -A INPUT  -i $IFACE -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o $IFACE -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT</description>
		<content:encoded><![CDATA[<p>Hello James,<br />
I tried your simple firewall on my box (Debian).<br />
Everyhing ok. But I have a little problem. I would like to allow inbound ssh traffic,too.<br />
It doesn&#8217;t work. Could you help me?</p>
<p>## SSH<br />
# Allow ssh outbound.<br />
iptables -A INPUT  -i $IFACE -p tcp &#8211;dport 22 -m state &#8211;state NEW -j ACCEPT #allow ssh in<br />
iptables -A INPUT  -i $IFACE -p tcp &#8211;sport 22 -m state &#8211;state ESTABLISHED -j ACCEPT<br />
iptables -A OUTPUT -o $IFACE -p tcp &#8211;dport 22 -m state &#8211;state NEW,ESTABLISHED -j ACCEPT</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Most Amazing Web Resources</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-example-rulesets/#comment-65760</link>
		<dc:creator>The Most Amazing Web Resources</dc:creator>
		<pubDate>Thu, 26 Jul 2007 03:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=21#comment-65760</guid>
		<description>&lt;strong&gt;Personal Firewall Shell Script...&lt;/strong&gt;

Shell script for setting up stateful firewall based on iptables.

Suitable for personal use.
Protects your computer from outside world attacks.
Handling packets based on connection state (ESTABLISHED, RELATED).
OS Linux

Shell script entry:
#!/bin/sh
#...</description>
		<content:encoded><![CDATA[<p><strong>Personal Firewall Shell Script&#8230;</strong></p>
<p>Shell script for setting up stateful firewall based on iptables.</p>
<p>Suitable for personal use.<br />
Protects your computer from outside world attacks.<br />
Handling packets based on connection state (ESTABLISHED, RELATED).<br />
OS Linux</p>
<p>Shell script entry:<br />
#!/bin/sh<br />
#&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-example-rulesets/#comment-26800</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Wed, 17 Jan 2007 05:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=21#comment-26800</guid>
		<description>Jason,

Make sure you have a double dash in front of state "--".

You cannot load additional modules unless you have root access. (generally true for a virtual machine, but not a virtual host)

Stateful packet inspection uses more memory than simple flag inspection, but is far more advanced.  For example, a spoofed SYN,ACK packet looks like a response to ACK, therefore a stateless firewall considers that as ESTABLISHED (anything w/ACK is), while the stateful firewall correctly determines that it is not part of any existing connection.  There is no way to get true state matching without connection tracking.</description>
		<content:encoded><![CDATA[<p>Jason,</p>
<p>Make sure you have a double dash in front of state &#8220;&#8211;&#8221;.</p>
<p>You cannot load additional modules unless you have root access. (generally true for a virtual machine, but not a virtual host)</p>
<p>Stateful packet inspection uses more memory than simple flag inspection, but is far more advanced.  For example, a spoofed SYN,ACK packet looks like a response to ACK, therefore a stateless firewall considers that as ESTABLISHED (anything w/ACK is), while the stateful firewall correctly determines that it is not part of any existing connection.  There is no way to get true state matching without connection tracking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-example-rulesets/#comment-20087</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 05 Dec 2006 16:16:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=21#comment-20087</guid>
		<description>Hi James,
 
 i am studying the script above, but find that my VPS hosting does not support "state" module ,
 i.e. script like
-m state --state ESTABLISHED -j ACCEPT
will not work ( with error : 'No chain/target/match by that name' )
i am thinking of 2 solutions, may i have some hint for them?
1. i've downloaded latest version of iptables-1.3.7 , but may i know how to config and build so that i can add more modules ? and is it possible? (some said can't change iptable once Linux was compiled)
2. i guess ,down to a lower level, state(s) are in the form of flags ( like SYN, ACK. )
would you mind telling us the flags pattern which have same meaning with 
a:  --state NEW
b:  --state ESTABLISHED 
c:  --state RELATED</description>
		<content:encoded><![CDATA[<p>Hi James,</p>
<p> i am studying the script above, but find that my VPS hosting does not support &#8220;state&#8221; module ,<br />
 i.e. script like<br />
-m state &#8211;state ESTABLISHED -j ACCEPT<br />
will not work ( with error : &#8216;No chain/target/match by that name&#8217; )<br />
i am thinking of 2 solutions, may i have some hint for them?<br />
1. i&#8217;ve downloaded latest version of iptables-1.3.7 , but may i know how to config and build so that i can add more modules ? and is it possible? (some said can&#8217;t change iptable once Linux was compiled)<br />
2. i guess ,down to a lower level, state(s) are in the form of flags ( like SYN, ACK. )<br />
would you mind telling us the flags pattern which have same meaning with<br />
a:  &#8211;state NEW<br />
b:  &#8211;state ESTABLISHED<br />
c:  &#8211;state RELATED</p>
]]></content:encoded>
	</item>
</channel>
</rss>
