back to notes

Disable all IPv6 on Debian 9 20171022

Before disabling the IPv6, let us see the available network cards on the system. Use ifconfig command.

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fd50:1d9:9fe3:1400:a00:27ff:fe36:34ae prefixlen 64 scopeid 0x0
inet6 fe80::a00:27ff:fe36:34ae prefixlen 64 scopeid 0x20
ether 08:00:27:36:34:ae txqueuelen 1000 (Ethernet)
RX packets 893 bytes 116790 (114.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1054 bytes 77781 (75.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 772 bytes 73806 (72.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 772 bytes 73806 (72.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


The above output confirms that IPv6 is enabled for both network cards. So, we will now disable IPv6 using below methods.

Method 1
Edit the /etc/sysctl.conf file.

sudo nano /etc/sysctl.conf
Place the following entry to disable IPv6 for all adapters.

net.ipv6.conf.all.disable_ipv6 = 1

sudo sysctl -p


last updated march 2018