Skip to contentSkip to conversation

How to disable Connection Tracking runtime

DISCUSSION Srinivas Murthy 3 participants 6 messages May 6, 2008 – May 7, 2008 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,
Is there a way to disable conntracking runtime?

I see a lot of cpu time taken up by these fns:

__hash_conntrack
ipt_do_table
conn_hash_table_lookup

I did see the perf tweaking params related to this but for test
purposes, I'd like to try w/ this disabled altogether (and going via/ the kernel config file is too painful for now).

Thanks.

#1 lore raw
Quoted 2 lines · Srinivas Murthy

Hi,
Is there a way to disable conntracking runtime?

Use -j NOTRACK.

#2 lore raw

I tried,

iptables -t raw -p all -j NOTRACK

I can see the rule installed.

However I still see these calls in the oprofile data.

_Sri

Quoted 8 lines · Jan Engelhardt
Quoted 2 lines · Srinivas Murthy

Hi,
Is there a way to disable conntracking runtime?

Use -j NOTRACK.

#3 lore raw

Sorry I installed,
iptables -t raw -A PREROUTING -p all -j NOTRACK

Quoted 22 lines · Srinivas Murthy

I tried,

iptables -t raw -p all -j NOTRACK

I can see the rule installed.

However I still see these calls in the oprofile data.

_Sri

Quoted 8 lines · Jan Engelhardt
Quoted 2 lines · Srinivas Murthy

Hi,
Is there a way to disable conntracking runtime?

Use -j NOTRACK.

#4 lore raw
Quoted 2 lines · Srinivas Murthy

Sorry I installed,
iptables -t raw -A PREROUTING -p all -j NOTRACK

You'll need this for locally generated packets:
iptables -t raw -A INPUT -j NOTRACK

But note that these only disable conntracking. You'll still see ipt_do_table().

If you want to stop iptables too then you'll need to unload the various iptables/conntrack/nat modules (there are lots of them). Even this doesn't quite remove it all: there are still netfilter hooks.

If they aren't built as modules then I don't think there is a solution other than rebuilding the kernel.

#5 lore raw
Quoted 2 lines · Philip Craig

You'll need this for locally generated packets:
iptables -t raw -A INPUT -j NOTRACK

Sorry:
iptables -t raw -A OUTPUT -j NOTRACK