Skip to contentSkip to conversation

Setting NOTRACK on all tcp connections

DISCUSSION Raviv 3 participants 3 messages Dec 1, 2010

lore
Share & tools
lore

Raviv

author
#0 lore raw

Hi,

I'm developing a module that should mark DSCP values on SIP and related RTP connections.
For that task i have created the relevant rules.
However i would to use the conntrack only for theses udp (SIP and RTP) connections.When testing in heavy TCP load environment i got the conntrack table full. I tried to setup a rule for notracking TCP connections as follows:

iptables -t raw -A PREROUTING -p tcp -j NOTRACK

but stiil i can see a lot of tcp connections in /proc/net/nf_conntrack.

How do i set the rule for tcp NOTRACK?

Thanks,

Raviv

#1 lore raw

Hello,

Quoted 6 lines · Raviv

I tried to setup a rule for notracking TCP connections as follows:

iptables -t raw -A PREROUTING -p tcp -j NOTRACK

but stiil i can see a lot of tcp connections in /proc/net/nf_conntrack.

If these TCP connections are established by the host, you need to add the same rule in the OUTPUT chain too. Also if you have IPv6 traffic you need to add the same rules with ip6tables.

#2 lore raw
Quoted 11 lines · Pascal Hambourg

Raviv a écrit :

Quoted 6 lines

I tried to setup a rule for notracking TCP connections as follows:

iptables -t raw -A PREROUTING -p tcp -j NOTRACK

but stiil i can see a lot of tcp connections in /proc/net/nf_conntrack.

If these TCP connections are established by the host, you need to add the same rule in the OUTPUT chain too. Also if you have IPv6 traffic you need to add the same rules with ip6tables.

And since we're ultramodern, it's actually

	-p tcp -j CT --notrack