Conntrack table editing utility
Hi,
I've had a request to develop/find a utility that can selectively remove entries from the conntrack table on linux 2.4. So if you changed where a tcp port dnats to in iptables you could vape any existing conntrack entry relating to it and any future packets will go to the new dnat target.
I'm mailing the list to find out if
a) Theres a blatant reason why this is a BAD THING to be thinking about doing.
b) See if a utility already exists
Thanks in advance for any help,
Yours,
Ian Abel
Quoted 2 lines · [email protected] wrote:
a) Theres a blatant reason why this is a BAD THING to be thinking about doing.
b) See if a utility already exists
I don't know, but I'd sure like such a utility. Would a better approach be to hack the kernel such that you could use echo/cat commands on the table?
Signature · 2 lines
mail to this address is discarded unless "/dev/rob0"
or "not-spam" is in Subject: headerthere is a file (don't remember the name) under /proc that have all contrack entries
Quoted 7 lines · /dev/rob0 wrote:
Quoted 2 lines · [email protected] wrote:
a) Theres a blatant reason why this is a BAD THING to be thinking about doing.
b) See if a utility already existsI don't know, but I'd sure like such a utility. Would a better approach be to hack the kernel such that you could use echo/cat commands on the table?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Jörg Harmuth
Quoted 2 lines · srg
there is a file (don't remember the name) under /proc that have all contrack entries
/proc/net/ip_conntrack
This is fine and all for viewing, but what is being requested is a utility to
"edit" (arbitrarily remove) ip_conntrack entries. Situations arrive when I'd
like to expire a cached conntrack entry sooner. There's a way to do this with TCP connections, but not UDP or other protocols as far as I can tell.
This would be really handy!
Ray
Quoted 2 lines
b) See if a utility already exists
While not a finished "utility," you probably want to look into the nfnetlink_conntrack patch for implementation. It provides the "delete conntrack entry X" functionality, among other things. I had success using this with a fedora core 1 release, 2.4.22 kernel (for doing a similar sort of thing as you're working on). The nfnetlink_conntrack patch I used was version 0.13.
Hope this helps.
phil