Leopold BAILLY <leo.bai...@infonie.fr> writes: > Mark Hindley <m...@hindley.org.uk> writes: > >> On Sat, Feb 12, 2011 at 11:43:16AM +0100, Leopold BAILLY wrote: >>> The issue is that apt-cacher is listening for IPv6 only. Have a look >>> at how other daemons, for example ssh, are listening to : >>> >>> leo@stellie:~$ netstat -na | grep :22 >>> tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN >>> >>> tcp6 0 0 :::22 :::* LISTEN >>> >>> >>> You can see that ssh is listening for both IPv4 and IPv6 incoming >>> connections. So maybe, the bug is there : you don't have to choose >>> between IPv6 and IPv4, but you have to do both, if possible. >> >> Maybe. The reason why I am a bit hesitant is that I have a system here >> on which the apt-cacher deamon is only listening on tcp6, but I can >> still connect to it using IPv4. I really want to understand why that >> mapping is not happening on your system. >> >> What kernel do you have? Is it one you have compiled or a stock one? Is >> the ipv6 module loaded. If not and you load it, does it make any >> difference? > > OK, I just discovered this file : > > leo@stellie:~$ cat /etc/sysctl.d/bindv6only.conf > # This sysctl sets the default value of the IPV6_V6ONLY socket option. > # > # 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. > > net.ipv6.bindv6only = 1 > > > dpkg -S cannot find any package it belongs to ; this must be a removed > package. > > I guess that removing this file or setting a value of 0 will fix the > issue, but it would be great to find which package brought this file > whith this default setting. > > I comment the line and I will give it a try after reboot.
That's it : this sysctl config file with net.ipv6.bindv6only = 1 is the reason why apt-cacher isn't listening to IPv4 anymore. I can't find any official Debian package providing this file with http://packages.debian.org/search?searchon=contents&keywords=bindv6only.conf&mode=exactfilename&suite=testing&arch=any, so I think everything is ok and I can safely remove this file. By the way, I notice on my host that half of the daemons are listening to both IPv4 *and* IPv6 ; I don't know if there is any best practice about doing this or not. leo@stellie:~$ for d in $(sudo netstat -nap | grep tcp6 | awk '{print $7}'); do sudo netstat -nap |grep $d |grep 'LISTEN ' ;done |sort -k7 tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 1939/slapd tcp6 0 0 :::389 :::* LISTEN 1939/slapd tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 1999/dnsmasq tcp6 0 0 :::53 :::* LISTEN 1999/dnsmasq tcp 0 0 0.0.0.0:464 0.0.0.0:* LISTEN 2047/kadmind tcp 0 0 0.0.0.0:749 0.0.0.0:* LISTEN 2047/kadmind tcp6 0 0 :::464 :::* LISTEN 2047/kadmind tcp6 0 0 :::80 :::* LISTEN 2191/apache2 tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN 2277/cupsd tcp6 0 0 :::631 :::* LISTEN 2277/cupsd tcp6 0 0 :::139 :::* LISTEN 2459/smbd tcp6 0 0 :::139 :::* LISTEN 2459/smbd tcp6 0 0 :::445 :::* LISTEN 2459/smbd tcp6 0 0 :::445 :::* LISTEN 2459/smbd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2532/sshd tcp6 0 0 :::22 :::* LISTEN 2532/sshd tcp6 0 0 :::3142 :::* LISTEN 4012/perl Thanks a lot for your support, Mark. -- Léo. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org