5

I have a very basic Ubuntu 20.04 server installation.

I am trying to disable the system from using temporary IPv6 addresses.

My netplan is as follows:

network:
    ethernets:
        ens160:
            addresses:
            - 192.168.1.10/24
            - "2605:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64"
            gateway4: 192.168.1.1
            gateway6: "2605:xxxx:xxxx:xxxx::1"
            accept-ra: no
            ipv6-privacy: off
            nameservers:
                addresses:
                - "2605:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx"
                - 192.168.1.10
    version: 2

This is the only file in the /etc/netplan/ directory.

I also disabled use_tempaddr with sysctl:

sudo sysctl -a | grep use_tempaddr
[sudo] password for xxxxxx:
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.ens160.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1

Notice that the changes are written to the files, so they persist.

I then do an sudo ip addr flush, reboot, but every time there's a 2nd IPv6 address with is dynamic mngtmpaddr noprefixroute.

...
    inet6 2605:xxxx:xxxx:yyyy:yyyy:yyyy:yyyy:yyyy/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 43183sec preferred_lft 43183sec
    inet6 2605:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 scope global
       valid_lft forever preferred_lft forever
...

How can I avoid that one from being created?

Anemoia
  • 151
  • 3

0 Answers0