Raspberry Pi – how to disable IPv6 in Raspbian OS

Raspberry Pi – how to disable IPv6 in Raspbian OS

To disable IPv6 temporarily
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
To disable IPv6 permanently
# vi /etc/sysctl.conf
Add this to the end
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv6.conf.eth0.disable_ipv6 = 1
# sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
# shutdown -r now
# cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
Check with “ifconfig” if the IPv6 address has disappeared
# ifconfig

Leave a Reply

You must be logged in to post a comment.