Netstat not displaying all listening ports when using IPv4 and IPv6
I am running a machine with both IPv4 and IPv6.
I noticed earlier that when doing a 'netstat -anl4' (or just grepping through 'netstat -an' output) that not all listening IPv4 ports are displayed. Example:
# netstat -anl4 | grep external_
Yet, it is definitely listening:
> telnet external_
Connected to external_
Escape character is '^]'.
It definitely seems like for applications that listen on both IPv4 and IPv6 that only the IPv6 listening socket is displayed, as if they are aggregated together. This is a problem because we can no longer trust netstat to properly display all listening sockets.
I would suggest that netstat always show every port that is listening on both the IPv4 and IPv6 stack. Having more data seems like a good thing here since netstat is the primary tool for determining which ports a machine is listening on.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS