After doing more research, I believe this is because Apache is not using
the IPV6_V6ONLY flag when it binds to port 80.  This allows the IPv6
socket to serve both IPv4 and IPv6 traffic.  Since there is technically
only one listening socket, this is why netstat only shows the IPv6
socket.

Historically we could use netstat to see exactly what is listening, but
in the case of IPV6_V6ONLY, it's entirely possible that an IPv6 socket
could handle IPv4 traffic and netstat would never show it.

Here is the README from the netbase package:

# When disabled, IPv6 sockets will also be able to send and receive IPv4
# traffic with addresses in the form ::ffff:192.0.2.1 and daemons listening
# on IPv6 sockets will also accept IPv4 connections.
#
# When IPV6_V6ONLY is enabled, daemons interested in both IPv4 and IPv6
# connections must open two listening sockets.
# This is the default behaviour of almost all modern operating systems.

IPV6_V6ONLY is controlled by the sysctl net.ipv6.bindv6only.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/657270

Title:
  Netstat not displaying all listening ports when using IPv4 and IPv6

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-tools/+bug/657270/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to