Note: ip_conntrack interface is getting aged. There is a new set of tools conntrack_tools, http://conntrack-tools.netfilter.org/.
There are a few things we can do to tweak ip_conntrack.
To find the current setting of ip_conntrack_max:
# cat /proc/sys/net/ipv4/ip_conntrack_max
To temporarily change this value, do
# echo "new_value" > /proc/sys/net/ipv4/ip_conntrack_max
To permanently change this value, do
# sysctl -w net.ipv4.ip_conntrack_max=new_value
# echo "new_value" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
Or do
# sysctl -w net.ipv4.ip_conntrack_tcp_timeout_established=new_value
To check the ip_conntrack buffer:
# grep conn /proc/slabinfo
To check the top 5 IPs recorded by ip_conntrack:
# cat /proc/net/ip_conntrack | cut -d ' ' -f 10 | cut -d '=' -f 2 | sort | uniq -c | sort -nr | head -n 5
Reference:
Comments
Anonymous
August 29, 2008
3 years 23 weeks
System Hardening
The following guide may also be useful:
http://xianshield.org/guides/apache2.0guide.html