Modified conntrack settings rewritten

Hi!
I have changed
/proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established from default 432000 to 7200
But after some process restart or system reboot value is set back to default. How to make changes permanent?

Hi ilmaars,

The value you’re modifying (/proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established) gets reset after a reboot or certain service restarts because it’s a runtime configuration. To make it persist, you can use a system-wide script located at /etc/sysconfig/rc.local.

The rc.local script is executed at the end of the boot process and is ideal for custom settings like yours. You can simply add a command to it, such as:

# Reduce conntrack TCP established timeout to 2 hours
echo 7200 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_established

For more details on how to use rc.local in IPFire, check the IPFire documentation on rc.local. It includes instructions to ensure the file is properly configured.

This should help retain your settings across reboots.

Hope this helps.

Thanks,
A G

2 Likes

Thank you very much for the comprehensive information!