Skip to contentSkip to conversation

Intercepting connection creation/close with libnetfilter_conntrack

DISCUSSION Hassan Sultan 1 participant 1 message Dec 17, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

I am trying to write a simple app, that will intercept all connection creation/close (any TCP connection and hopefully also any UDP reception/emission).

I tried simply copying examples (I'm on Ubuntu 14.04 x64 with a 3.13-032 kernel) like this one :

https://git.netfilter.org/libnetfilter_conntrack/plain/utils/conntrack_events.c

However, when I launch it (using sudo so it's as root) and then create a tcp connection (to localhost using telnet, confirming the connection was created), nothing shows up.

What am I missing ? Do I need to enable auditing in the kernel/iptables somehow ?

Thanks,

Hassan