how to clear the conntrack table!
Quoted 3 lines · Decoy
Hi!
how can I clear the conntrack table?!
unfortunately there is currently no other way than to unload and reload the ip_conntrack module :(
Quoted 2 lines
Thanks very much!
dec0y
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie
You could look into using the patch I send some day ago. the you could set all connection to unconfirmed, and then set you rule set so that al unconfirmed packets pass the rule set
/flavio
Quoted 10 lines · Harald Welte
Quoted 3 lines · Decoy
Hi!
how can I clear the conntrack table?!
unfortunately there is currently no other way than to unload and reload the
ip_conntrackmodule :(Quoted 2 lines
Thanks very much!
dec0y
Quoted 2 lines · Harald Welte
unfortunately there is currently no other way than to unload and reload the
ip_conntrackmodule :(
I've tried this a couple of times. The module seems to get deleted (lsmod still shows ip_conntrack but as deleted) but rmmod does NOT finish. It grabs 100% CPU for minutes. I had to reboot the box then. Any hints?
Regards,
Eicke.
In case your running an older kernel (before -pre9), try the latest -rc kernel or submitted/70_ip-conntrack-expect-drop-refcnt-combined.patch from patch-o-matic.
Bye,
Patrick
Quoted 13 lines · Eicke Friedrich
Quoted 2 lines · Harald Welte
unfortunately there is currently no other way than to unload and reload the
ip_conntrackmodule :(I've tried this a couple of times. The module seems to get deleted (lsmod still shows
ip_conntrackbut as deleted) but rmmod does NOT finish. It grabs 100% CPU for minutes. I had to reboot the box then. Any hints?Regards,
Eicke.
Where is conntrack in the iptables chain?
In reply to Harald WelteI was wondering, where in the iptables chain does conntrack start? In the segment of the chain, does it ack before or after inserted rules (like QUEUE)? Thanks in advance!
-Scott
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Re: Where is conntrack in the iptables chain?
Quoted 3 lines · Scott MacKay
I was wondering, where in the iptables chain does conntrack start? In the segment of the chain, does it ack before or after inserted rules (like QUEUE)?
What do you mean with 'does it ack'? conntracking is not supposed to pass verdicts on a packet, it's just looking up tracking information for a passing packet.
That connection lookup happens before all other hooks, i.e. before a packet enters iptables in the mangle table PREROUTING chain. Thus, even rules in the prerouting chain can already use the tracking information.
Does that answer your question?
best regards
Patrick
Re: Where is conntrack in the iptables chain?
Lol, ack = act. Only 1 cup of coffee this morning...
--- Patrick Schaaf <[email protected]> wrote:
<snip>
Quoted 9 lines
That connection lookup happens before all other hooks, i.e. before a
packet enters iptables in the mangle table PREROUTING chain. Thus,
even rules in the prerouting chain can already use the tracking
information.Does that answer your question?
Yup. Are there any examples of how to manipulate packets prior to conntrack, either as a loadable module or via iptables? I seem to recall a patch which added raw tables that acted before anything else but do not recall which rev of iptables it acted on...
-Scott
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Re: Where is conntrack in the iptables chain?
Quoted 5 lines
Yup. Are there any examples of how to manipulate packets prior to conntrack, either as a loadable module or via iptables? I seem to recall a patch which added raw tables that acted before anything else but do not recall which rev of iptables it acted on...
Hi again,
you want to look at the general netfilter hooks, and how their priorities work. You can look at the iptables kernel source for inspiration, it's rather simple. In net/ipv4/netfilter, grep for nf_register_hook, and look at the argument to that function, usually a locally defined constant struct. The conntrack hooking is in ip_conntrack_standalone.c. Notice the NF_IP_PRI_CONNTRACK in the struct definition:
this is defined in include/linux/netfilter_ipv4.h, and represents a numerical priority value; for each
hook that the core network stack runs, the hook functions for all registered modules, are called
in numerically ascending priority order. Specifically, NF_IP_PRI_CONNTRACK is the lowest, numerically -200, so for your own hook, you'll need something even below that value, e.g. -201.
all the best
Patrick