Trace Network Connections

Via command line:

netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -nr
(the above will list number of connections per IP)

netstat -n

# This tell you how many sessions are open right now.

cat /proc/net/ip_conntrack | wc -l

# This tells you the maximum number of conntrack entries you can have in

cat /proc/sys/net/ipv4/ip_conntrack_max

Once the previous number hits beyond the latter, you should start seeing
these messages. I would increase the latter number by calling:

echo “<some_bigger_number>” > /proc/sys/net/ipv4/ip_conntrack_max

or if you want it to span reboots, you can place the following in
/etc/sysctl.conf = <some_big_number>

December 4, 2014   1041    Linux  
Total 0 Votes:

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Comment