[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian 11: How to disable IPv6



On Sat, 9 Jul 2022, Andy Smith wrote:
On Sat, Jul 09, 2022 at 03:52:03PM +0200, Roger Price wrote:
I would like to disable IPv6 adapters in order to persuade
fetchmail to talk to exim4.

Sounds like you have a misconfiguration that should be fixed, rather
than disabling IPv6 to work around it.

Its the misconfiguration that I'm trying to fix. When I try to start fetchmail I get the error message

 Jul 09 10:22:57 titan fetchmail[7286]:
                 reading message
                 mailbox@rogerprice.org@mail.gandi.net:1 of 7 (8954 octets)
                 (log message incomplete)
 Jul 09 10:22:57 titan fetchmail[7286]:
                 Connection errors for this poll:
                 name 0: connection to localhost:smtp [127.0.0.1/25] failed:
                 Connection refused.
                 name 1: connection to localhost:smtp [127.0.0.1/25] failed:
                 Connection refused.
 Jul 09 10:22:57 titan fetchmail[7286]: SMTP connect to localhost failed

I understand this to mean that my Debian 11 machine cannot connect to itself on port 25 despite the netfilter rule "iif lo accept", so I assumed it was an IPv6 problem with fetchmail trying to use IPv6 with exim4. As a check, I tried:

 root@titan ~ telnet localhost 25
 Trying 127.0.0.1...
 Trying ::1...
 telnet: Unable to connect to remote host: Address family not supported by protocol

There is nothing I can find in the exim4 configuration that would inhibit IPv6.

   net.ipv6.conf.all.disable_ipv6 = 1
and run sysctl -p as root.  With Debian 11 this generates the error message
   sysctl: cannot stat /proc/sys/net/ipv6/conf/all/disable_ipv6: No such file or directory
because directory /proc/sys/net/ipv6 doesn't exist. What is the new way of
disabling IPv6?

That directory exists for me on all of my Debian 11 machines, so I
guess you have something else wrong. Or maybe have already disabled
IPv6 on the kernel command line (don't know if that removes the
net.ipv6 sysfs tree as well).

I have just discovered that in file /etc/default/grub I already have lines

  #  See https://nouveau.freedesktop.org/Bugs.html
  GRUB_CMDLINE_LINUX="log_buf_len=1M ipv6.disable=1 net.ifnames=0 3"

I do not remember adding the ipv6.disable=1 myself. I do not know where it comes from.

Roger


Reply to: