I've updated a machine to Debian 9.1 and everything seems to be fine, however I can't disable IPv6 autoconfig.
Background: I only want to use some specific IPv6 addresses on the machine that I'm defining in /etc/systemd/network/10-static-eth0.network
:
[Match]
Name=eth0
[Network]
Address=2a04:52c0:xxx:xxx::xxx/48
Address=2a04:52c0:xxx:xxx::xxx/48
Address=2a04:52c0:xxx:xxx::xx/48
Gateway=2a04:52c0:xxx::1
Address=5.2.xxx.xxx/25
Address=5.2.xxx.xxx/25
Address=5.2.xxx.xxx/25
Gateway=5.2.xxx.xxx
To disable IPv6 autoconfig I added the following at the end of /etc/sysctl.conf
:
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.eth0.autoconf=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.eth0.accept_ra=0
net.ipv6.conf.default.accept_dad=0
net.ipv6.conf.all.accept_dad=0
net.ipv6.conf.eth0.accept_dad=0
After rebooting there's no dynamic / autoconfig IPv6 address but after a while it appears on ip addr show
:
inet6 2a04:52c0:xxxx:xxxx:xxxx:xxx:xxxx:1e3d/64 scope global mngtmpaddr noprefixroute dynamic
valid_lft 2590732sec preferred_lft 603532sec
How can I avoid this autoconfig IPv6 address and make sure only the static addresses get to work?
Thank you.
I believe these addresses marked as
mngtmpaddr
andnoprefixroute
come from the IPv6 Privacy Extensions standard (RFC 4941) and are created by the kernel itself.You should be able to turn that feature off adding
to your
/etc/sysctl.conf
Hope it helps!