STATELESS
Hi
Does any know how to change Iptables from statefull to stateless ?
Thanks
Quoted 4 lines · Matthew Mileham
Hi
Does any know how to change Iptables from statefull to stateless ?
Leave out the -m state parameters ?
Quoted 2 lines
Thanks
Signature · 7 lines
-- Raymond Leach <[email protected]> Network Support Specialist http://www.knowledgefactory.co.za "lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import" Key fingerprint = 7209 A695 9EE0 E971 A9AD 00EE 8757 EE47 F06F FB28 --
Quoted 3 lines · Ray Leach
Quoted 1 line · Matthew Mileham
Does any know how to change Iptables from statefull to stateless ?
Leave out the -m state parameters ?
And unload ip_conntrack module to save load, for once module is loaded, connection tracking is still working, even if state match is not used.
Signature · 2 lines
http://www.netexit.com/~sid/ PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
Quoted 1 line · Matthew Mileham
Does any know how to change Iptables from statefull to stateless ?
Don't load the ip_conntrack module, and / or don't use any iptables rules that use "-m state" in the arguments :)
Cheers,
Gavin.
Quoted 6 lines · Gavin Hamill
Quoted 1 line · Matthew Mileham
Does any know how to change Iptables from statefull to stateless ?
Don't load the
ip_conntrackmodule, and / or don't use any iptables rules that use "-m state" in the arguments :)
Yeah, connection tracking automagically implies state inspection.
Quoted 3 lines
Cheers,
Gavin.
Signature · 7 lines
-- Raymond Leach <[email protected]> Network Support Specialist http://www.knowledgefactory.co.za "lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import" Key fingerprint = 7209 A695 9EE0 E971 A9AD 00EE 8757 EE47 F06F FB28 --
Quoted 4 lines · Ray Leach
Quoted 3 lines
Don't load the
ip_conntrackmodule, and / or don't use any iptables rules that use "-m state" in the arguments :)Yeah, connection tracking automagically implies state inspection.
OK. Thanks for the informative comments but can you lay out the steps to prevent stateful inspection? For example, how to unload "ip_conntrack" and to prevent it from being reloaded again?
Thanks again.
Ramin
Quoted 11 lines · Ramin Dousti
Quoted 4 lines · Ray Leach
Quoted 3 lines
Don't load the
ip_conntrackmodule, and / or don't use any iptables rules that use "-m state" in the arguments :)Yeah, connection tracking automagically implies state inspection.
OK. Thanks for the informative comments but can you lay out the steps to prevent stateful inspection? For example, how to unload "
ip_conntrack" and to prevent it from being reloaded again?
Personally, I would re-compile the kernel without connection tracking support.
Quoted 3 lines
Thanks again.
Ramin
Signature · 7 lines
-- Raymond Leach <[email protected]> Network Support Specialist http://www.knowledgefactory.co.za "lynx -source http://www.rchq.co.za/raymondl.asc | gpg --import" Key fingerprint = 7209 A695 9EE0 E971 A9AD 00EE 8757 EE47 F06F FB28 --
Quoted 8 lines · Ray Leach
Quoted 6 lines
Quoted 1 line
Yeah, connection tracking automagically implies state inspection.
OK. Thanks for the informative comments but can you lay out the steps to prevent stateful inspection? For example, how to unload "
ip_conntrack" and to prevent it from being reloaded again?Personally, I would re-compile the kernel without connection tracking support.
OK. If you recompile without conntrack, can you do NAT? I'm just wondering?
Thanks again.
Ramin
Quoted 11 lines
Quoted 9 lines
Quoted 7 lines
Quoted 2 lines
Yeah, connection tracking automagically implies state inspection.
OK. Thanks for the informative comments but can you lay out the steps to prevent stateful inspection? For example, how to unload "
ip_conntrack" and to prevent it from being reloaded again?Personally, I would re-compile the kernel without connection tracking support.
OK. If you recompile without conntrack, can you do NAT? I'm just wondering?
no, Netfilter's NAT relies upon the conntrack.
Can I ask you why do you want to turn off the conntrack ? If it's for speed or memory reasons, then using NAT will have a similar overhead (maybe not exactly the same, but similar) anyway. When you NAT a connection, you're forced to keep track of the connection a way or another, to NAT further packets of the connection the same way.
Signature · 5 lines
Gael Le Mignot "Kilobug" - [email protected] - http://kilobug.free.fr GSM : 06.71.47.18.22 (in France) ICQ UIN : 7299959 Fingerprint : 1F2C 9804 7505 79DF 95E6 7323 B66B F67B 7103 C5DA Member of HurdFr: http://hurdfr.org - The GNU Hurd: http://hurd.gnu.org
Quoted 5 lines
Quoted 1 line
OK. If you recompile without conntrack, can you do NAT? I'm just wondering?
no, Netfilter's NAT relies upon the conntrack.
Can I ask you why do you want to turn off the conntrack?
I don't. I just wanted to learn from the people who were saying "just don't load the ip_conntrack..."
Ramin
Quoted 5 lines
If it's for
speed or memory reasons, then using NAT will have a similar overhead (maybe not exactly the same, but similar) anyway. When you NAT a connection, you're forced to keep track of the connection a way or another, to NAT further packets of the connection the same way.
Quoted 3 lines · Ramin Dousti
Quoted 1 line
Can I ask you why do you want to turn off the conntrack?
I don't. I just wanted to learn from the people who were saying "just don't load the
ip_conntrack..."
I assume that if someone wants to fallback on stateless filtering is for saving load on his box. I can miss something, but I really don't see another reason. Once ip_conntrack is loaded, all packets are tracked anyway, weither you use state match or not. Yes, one can write a whole stateless ruleset with conntrack running, but what's the point : the cost implied by a rule with state matching and one without is the same, as state flaging is done anyway !
That's why assuming that stateless is for save load implies ip_conntrack module removal. But, as it relies on conntrack, NAT is broken. It is as simple as this.
So, the remaining question is "why does OP wants to fallback to stateless filtering". If answer is "to save load", then he will have to remove ip_conntrack. If answer is... Well, I don't know, anything else, such as "I like writing weak ruleset for fun with powerful tools", then not using state matching will be sufficient.
Signature · 2 lines
http://www.netexit.com/~sid/ PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
Quoted 17 lines · Cedric Blancher
Quoted 3 lines · Ramin Dousti
Quoted 1 line
Can I ask you why do you want to turn off the conntrack?
I don't. I just wanted to learn from the people who were saying "just don't load the
ip_conntrack..."I assume that if someone wants to fallback on stateless filtering is for saving load on his box. I can miss something, but I really don't see another reason. Once
ip_conntrackis loaded, all packets are tracked anyway, weither you use state match or not. Yes, one can write a whole stateless ruleset with conntrack running, but what's the point : the cost implied by a rule with state matching and one without is the same, as state flaging is done anyway !That's why assuming that stateless is for save load implies
ip_conntrackmodule removal. But, as it relies on conntrack, NAT is broken. It is as simple as this.
Quoted 5 lines
So, the remaining question is "why does OP wants to fallback to stateless filtering". If answer is "to save load", then he will have to remove
ip_conntrack. If answer is... Well, I don't know, anything else, such as "I like writing weak ruleset for fun with powerful tools", then not using state matching will be sufficient.
hi,
I do believe that the 2.4 and 2.6 kernels contain an alternative NAT mechanism associated with the Config variable: CONFIG_IP_ROUTE_NAT
This var is tied to CONFIG_NET_FASTROUTE and "Advanced Router" or something similar. Internally the source code uses flags like RTCF_NAT etc.
This mechanism is incomptabile with the whole netfilter infrastructure. You MUST enable only ONE of the two mechanisms at any given time. Moreover I have not used this mechanism and dont know if it works and how well it works and what its limitations are.
Signature · 9 lines
Ranjeet Shetye Senior Software Engineer Zultys Technologies Ranjeet dot Shetye2 at Zultys dot com http://www.zultys.com/ The views, opinions, and judgements expressed in this message are solely those of the author. The message contents have not been reviewed or approved by Zultys.
Quoted 9 lines · Ranjeet Shetye
I do believe that the 2.4 and 2.6 kernels contain an alternative NAT mechanism associated with the Config variable:
CONFIG_IP_ROUTE_NATThis var is tied toCONFIG_NET_FASTROUTEand "Advanced Router" or something similar. Internally the source code uses flags likeRTCF_NATetc.
This mechanism is incomptabile with the whole netfilter infrastructure. You MUST enable only ONE of the two mechanisms at any given time. Moreover I have not used this mechanism and dont know if it works and how well it works and what its limitations are.
See documentation at :
http://www.suse.de/~mha/linux-ip-nat/diplom/nat.html
With 2.2 kernels, one was able to achieve simple NAT with iproute, but it was far from flexible.
I must admit that, even if this option is activated into my kernel, I don't use it at all.
Signature · 2 lines
http://www.netexit.com/~sid/ PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
Quoted 8 lines · Cedric Blancher
See documentation at :
http://www.suse.de/~mha/linux-ip-nat/diplom/nat.html
With 2.2 kernels, one was able to achieve simple NAT with iproute, but it was far from flexible.
Yupp, not as flexible, but much faster than netfilter NAT. It doesn't rely on any kind of connection tracking at all, which is part problem, part good thing. Good thing is, you get much lower overhead (and hence can shovel more packets through), bad thing is, it gets less flexible, and it isn't secure per se (doesn't track, and hence no knowledge about 3-way handshakes, and no filtering).
Of course, it may suite much better on a router I assume, and if you want filtering like that, you may as well run netfilter NAT anyways.
Quoted 3 lines
I must admit that, even if this option is activated into my kernel, I don't use it at all.
----
Oskar Andreasson
http://www.frozentux.net
http://iptables-tutorial.frozentux.net
http://ipsysctl-tutorial.frozentux.net
mailto:[email protected]
On Tue, Sep 16, 2003 at 06:57:13PM +0200, Cedric Blancher spoke thusly:
Quoted 13 lines
Le mar 16/09/2003 ? 17:50, Ramin Dousti a ?crit :
Quoted 3 lines
Quoted 1 line
Can I ask you why do you want to turn off the conntrack?
I don't. I just wanted to learn from the people who were saying "just don't load the
ip_conntrack..."I assume that if someone wants to fallback on stateless filtering is for saving load on his box. I can miss something, but I really don't see another reason. Once
ip_conntrackis loaded, all packets are tracked anyway, weither you use state match or not. Yes, one can write a whole stateless ruleset with conntrack running, but what's the point : the cost implied by a rule with state matching and one without is the same, as state flaging is done anyway !
Quoted 3 lines
That's why assuming that stateless is for save load implies
ip_conntrackmodule removal. But, as it relies on conntrack, NAT is broken. It is as simple as this.
(snip)
In regards to system load (stateful vs non-stateful) -- the following paper states that might not always be the case. YMMV of course.
http://www.benzedrine.cx/pf-paper.html
Furthermore, the pf performance tricks do seem rather nice to me :-) But I'm not a coder, so the logic complexity might be excessive.