up vote 6 down vote favorite
3
share [g+] share [fb]

How can I permanently disable autoconfiguration of IPv6 in Linux? When I try to manually delete an address from an interface with:

ip -6 addr del 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64 dev eth1

It will reappear a few seconds later, I want it to be gone permanently, but without disabling IPv6 all together.

link|improve this question

44% accept rate
feedback

1 Answer

up vote 6 down vote accepted

Auto configuration can be disabled temporary for eth1 with:

sudo sysctl -w net.ipv6.conf.eth1.autoconf=0
sudo sysctl -w net.ipv6.conf.eth1.accept_ra=0

or for all interfaces with:

sudo sysctl -w net.ipv6.conf.all.autoconf=0
sudo sysctl -w net.ipv6.conf.all.accept_ra=0

Reenabling works by using 1 instead of 0 in the call.

Disabling it permanently can be done with an entry to /etc/sysctl.conf. On Debian Etch (probably on newer too), without setting the accept_ra, the system will autoconfigure using the Link local adress (fe80..)

link|improve this answer
1  
Also, automatic address configuration and router discovery will be disabled if the host itself is a router, i.e net.ipv6.conf.all.forwarding=1 is set. – Gart Sep 18 '11 at 13:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.