Linux setup steps/Disable IPv6

From Nick Jenkins

Jump to: navigation, search

Disabling IPv6:

nano /etc/modprobe.conf

add these two lines:

alias net-pf-10 off
alias ipv6 off

Also on recent Debian / Ubuntu systems you can disable your undesired modules by adding them to /etc/modprobe.d/blacklist :

nano /etc/modprobe.d/blacklist

... and to disable IPv6 just add these two lines:

# Disable IPv6:
blacklist ipv6

Then:

reboot

Can check has been successfully disabled with:

ip a | grep inet6

(should give no output when IPv6 disabled)

... and:

/usr/bin/lsof -i | grep LISTEN

Should only list "IPv4" entries.

... and:

netstat -l

Should not show "tcp6" and "udp6" after the reboot if it is working.

Personal tools