netstat -M for 2.4 kernels
I used to have a 2.2 kernel on my server. Running netstat -M would show me all the masqueraded connections which I used a lot. I've got a 2.4 kernel on it now and the netstat -M won't work anymore. Netstat uses /proc/net/ip_masquerade for the -M switch. But I use iptables now so it doesn't exist anymore. I wrote a simple script which parses the output of /proc/net/ip_conntrack to show the masqueraded connections. But it's still not totally what I want because it doesn't resolve ip numbers like netstat -M used to do. I think it would be a bit of overkill and probably really slow if I would add name resolving to the script.
Just wondering if anyone else has run into the same problem and how they solved it.
|