Skip to contentSkip to conversation

Ctnetlink?

DISCUSSION Paul Albert 2 participants 2 messages Oct 30, 2003 – Nov 3, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi all -

I'm quite interested in removing some or all of the connection tracking entries at various times while iptables is in operation. My searching around the archives had led me to a mysterious piece of code, ctnetlink. I can see it listed in the POM, however, the patch link isn't valid.

My questions:

Will this provide me a command-line interface to remove connections from ip_conntrack?
Is there more documentation on this?

Quoted 1 line

From looking through the code, it appears that I could call

ip_conntrack_cleanup in ip_conntrack_core.c to remove all of the entries. Would this work or is there a better way?

Thanks much,
Paul

#1 lore raw
Quoted 6 lines · Paul Albert

Hi all -

I'm quite interested in removing some or all of the connection tracking entries at various times while iptables is in operation. My searching around the archives had led me to a mysterious piece of code, ctnetlink. I can see it listed in the POM, however, the patch link isn't valid.

patch-o-matic is a set of specially-formated patches and the according software. just downloading a .patch file wouldn't help anyway. you need to download the patch-o-matic suite (either the latest release, or via anonymous cvs).

Quoted 2 lines

Will this provide me a command-line interface to remove connections from ip_conntrack?

no, but you can easily write one that sends the respective netlink messages to the ctnetlink core.

Quoted 1 line

Is there more documentation on this?

no.

Quoted 5 lines

From looking through the code, it appears that I could call ip_conntrack_cleanup in ip_conntrack_core.c to remove all of the entries. Would this work or is there a better way?

this is inside the kernel. I suppose you were looking for a way to do this from a userspace app?

Quoted 2 lines

Thanks much,
Paul

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