<?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 Connection Tracking - TCP</title>
	<atom:link href="http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/</link>
	<description></description>
	<pubDate>Sun, 23 Nov 2008 12:36:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Jens</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-73122</link>
		<dc:creator>Jens</dc:creator>
		<pubDate>Thu, 06 Sep 2007 16:00:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-73122</guid>
		<description>Hi James,

I have a problem with this iptables entry.
iptables -A INPUT -p tcp ! -–syn -m state –-state NEW -j DROP 

Every packet with a syn will be let through even the synack. But how can i build a rule that only allows syn with state new (without syn+ack and state new)?

I tried this but it wont work.
iptables -A INPUT -p tcp ! -–tcp-flags SYN SYN -m state –-state NEW -j DROP 

Would you help me pls?

regards 
Jens</description>
		<content:encoded><![CDATA[<p>Hi James,</p>
<p>I have a problem with this iptables entry.<br />
iptables -A INPUT -p tcp ! -–syn -m state –-state NEW -j DROP </p>
<p>Every packet with a syn will be let through even the synack. But how can i build a rule that only allows syn with state new (without syn+ack and state new)?</p>
<p>I tried this but it wont work.<br />
iptables -A INPUT -p tcp ! -–tcp-flags SYN SYN -m state –-state NEW -j DROP </p>
<p>Would you help me pls?</p>
<p>regards<br />
Jens</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tarun</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-44396</link>
		<dc:creator>tarun</dc:creator>
		<pubDate>Thu, 19 Apr 2007 09:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-44396</guid>
		<description>i need some help on network security,i also heard ab the people who cracks the pix security if u know some thing related to the topic please let me know 
thanks
Tarun</description>
		<content:encoded><![CDATA[<p>i need some help on network security,i also heard ab the people who cracks the pix security if u know some thing related to the topic please let me know<br />
thanks<br />
Tarun</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Rogers</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-6317</link>
		<dc:creator>Paul Rogers</dc:creator>
		<pubDate>Sun, 13 Aug 2006 05:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-6317</guid>
		<description>With your ruleset I was finding at some webservers but not others my client-side FIN-ACK from Firefox-1.5.0.5 were being logged &#38; dropped by the firewall.  I am presuming the server sent the final packet in an envelope stamped "Your done, I'm outta here" (FIN-ACK), causing IP to tear the connection down and my browser's FIN-ACK response output to no longer be from an ESTABLISHED connection.  I added a rule to accept packets with those flags, and send them anyway, but it seems a bit cludgy.  Comments?</description>
		<content:encoded><![CDATA[<p>With your ruleset I was finding at some webservers but not others my client-side FIN-ACK from Firefox-1.5.0.5 were being logged &amp; dropped by the firewall.  I am presuming the server sent the final packet in an envelope stamped &#8220;Your done, I&#8217;m outta here&#8221; (FIN-ACK), causing IP to tear the connection down and my browser&#8217;s FIN-ACK response output to no longer be from an ESTABLISHED connection.  I added a rule to accept packets with those flags, and send them anyway, but it seems a bit cludgy.  Comments?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bc</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-1484</link>
		<dc:creator>bc</dc:creator>
		<pubDate>Thu, 01 Jun 2006 03:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-1484</guid>
		<description>I was just wondering, does anyone know the meaning of "use=1" field visible in each and every output? For example:

tcp      6 431995 ESTABLISHED
src=140.208.5.62 dst=207.46.230.218 sport=1311 dport=80 src=207.46.230.218
dst=140.208.5.62 sport=80 dport=1311 [ASSURED] use=1

Thanks in advance for any help.

bc</description>
		<content:encoded><![CDATA[<p>I was just wondering, does anyone know the meaning of &#8220;use=1&#8243; field visible in each and every output? For example:</p>
<p>tcp      6 431995 ESTABLISHED<br />
src=140.208.5.62 dst=207.46.230.218 sport=1311 dport=80 src=207.46.230.218<br />
dst=140.208.5.62 sport=80 dport=1311 [ASSURED] use=1</p>
<p>Thanks in advance for any help.</p>
<p>bc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stephens</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-154</link>
		<dc:creator>James Stephens</dc:creator>
		<pubDate>Tue, 21 Mar 2006 01:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-154</guid>
		<description>Matthias,

Hi. Yes I think you are right. There's no way to do it.

Best,

James</description>
		<content:encoded><![CDATA[<p>Matthias,</p>
<p>Hi. Yes I think you are right. There&#8217;s no way to do it.</p>
<p>Best,</p>
<p>James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias Loepfe</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-151</link>
		<dc:creator>Matthias Loepfe</dc:creator>
		<pubDate>Fri, 17 Mar 2006 12:49:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-151</guid>
		<description>Hi James

Sorry for the long delay of this answer! I was working on other projects..

No. I had tried this out before writing to you. I think it is impossible to do what I wanted, because of the way TCP/IP sessionhandling works.

The routing/redirect decission must be made on the first packet and then all the following will the handled the same way. But the first payload packet is the third tcp packet in the session, what means it would be possible to drop the connection but not to redirect the already established one.

Thaks anyway for your help

regards

Matthias</description>
		<content:encoded><![CDATA[<p>Hi James</p>
<p>Sorry for the long delay of this answer! I was working on other projects..</p>
<p>No. I had tried this out before writing to you. I think it is impossible to do what I wanted, because of the way TCP/IP sessionhandling works.</p>
<p>The routing/redirect decission must be made on the first packet and then all the following will the handled the same way. But the first payload packet is the third tcp packet in the session, what means it would be possible to drop the connection but not to redirect the already established one.</p>
<p>Thaks anyway for your help</p>
<p>regards</p>
<p>Matthias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stephens</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-105</link>
		<dc:creator>James Stephens</dc:creator>
		<pubDate>Tue, 28 Feb 2006 16:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-105</guid>
		<description>Matthias,

Hmmm. Tricky to examine the payload.

There's a string match patch, detailed here:
http://www.netfilter.org/projects/patch-o-matic/pom-extra.html#pom-extra-string

An example would be:
iptables -A INPUT -m string --string '*.exe' -j REDIRECT

.. which redirects upon locating the string '.exe' in the payload.

Will that do?

Best,
James</description>
		<content:encoded><![CDATA[<p>Matthias,</p>
<p>Hmmm. Tricky to examine the payload.</p>
<p>There&#8217;s a string match patch, detailed here:<br />
<a href="http://www.netfilter.org/projects/patch-o-matic/pom-extra.html#pom-extra-string" rel="nofollow">http://www.netfilter.org/projects/patch-o-matic/pom-extra.html#pom-extra-string</a></p>
<p>An example would be:<br />
iptables -A INPUT -m string &#8211;string &#8216;*.exe&#8217; -j REDIRECT</p>
<p>.. which redirects upon locating the string &#8216;.exe&#8217; in the payload.</p>
<p>Will that do?</p>
<p>Best,<br />
James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias Loepfe</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-104</link>
		<dc:creator>Matthias Loepfe</dc:creator>
		<pubDate>Tue, 28 Feb 2006 14:33:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-104</guid>
		<description>Hi

I wonder if you know of any way to redirect only the tcp connections with a given payload at the beginning of the first data packet. I try to redirect only the CONNECT calls to a webproxy.

Best regards

Matthias</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I wonder if you know of any way to redirect only the tcp connections with a given payload at the beginning of the first data packet. I try to redirect only the CONNECT calls to a webproxy.</p>
<p>Best regards</p>
<p>Matthias</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Stephens</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-63</link>
		<dc:creator>James Stephens</dc:creator>
		<pubDate>Tue, 21 Feb 2006 17:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-63</guid>
		<description>Here's a way to limit connections to 100, with a maximum of 10 per second. Is this what you had in mind?

The default here is to drop the extra connections but you could do something else.

iptables -N syn-flood-$iface
iptables -A INPUT -i $iface -p tcp --syn -j syn-flood-$iface
iptables -A syn-flood-$iface -m limit --limit 10/s --limit-burst 100 -j RETURN
iptables -A syn-flood-$iface -j DROP

Best,
James</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a way to limit connections to 100, with a maximum of 10 per second. Is this what you had in mind?</p>
<p>The default here is to drop the extra connections but you could do something else.</p>
<p>iptables -N syn-flood-$iface<br />
iptables -A INPUT -i $iface -p tcp &#8211;syn -j syn-flood-$iface<br />
iptables -A syn-flood-$iface -m limit &#8211;limit 10/s &#8211;limit-burst 100 -j RETURN<br />
iptables -A syn-flood-$iface -j DROP</p>
<p>Best,<br />
James</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Himanshu Nagpal</title>
		<link>http://www.sns.ias.edu/~jns/wp/2006/01/12/iptables-connection-tracking-tcp/#comment-62</link>
		<dc:creator>Himanshu Nagpal</dc:creator>
		<pubDate>Tue, 21 Feb 2006 16:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.sns.ias.edu/~jns/wp/?p=17#comment-62</guid>
		<description>hi 

i am looking for redirect TCP connection if number of connection exceed 100 is their any way  i rediect packets as number of connection exceed more then 100 

please reply soon 

thnaks 
Himanshu Nagpal 
Network Administrator</description>
		<content:encoded><![CDATA[<p>hi </p>
<p>i am looking for redirect TCP connection if number of connection exceed 100 is their any way  i rediect packets as number of connection exceed more then 100 </p>
<p>please reply soon </p>
<p>thnaks<br />
Himanshu Nagpal<br />
Network Administrator</p>
]]></content:encoded>
	</item>
</channel>
</rss>
