How to disable IPv6 on Ubuntu?

To check if IPv6 is enabled or disabled, from a terminal window:

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

0 means it’s enabled and 1 is disabled.

To disable IPv6

$ sudo su -
# nano /etc/sysctl.conf

and add these lines to sysctl.conf file

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save sysctl.conf file with new config, then reboot your system

# reboot

Check your system again

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Now you should see “1″ means IPv6 has been disabled on your system.

From http://namhuy.net/1419/disable-ipv6-ubuntu-linux-mint.html

To check if IPv6 is enabled or disabled, from a terminal window:

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

0 means it’s enabled and 1 is disabled.

To disable IPv6

扫描二维码关注公众号,回复: 5446044 查看本文章
$ sudo su -
# nano /etc/sysctl.conf

and add these lines to sysctl.conf file

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save sysctl.conf file with new config, then reboot your system

# reboot

Check your system again

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Now you should see “1″ means IPv6 has been disabled on your system.

From http://namhuy.net/1419/disable-ipv6-ubuntu-linux-mint.html

猜你喜欢

转载自blog.csdn.net/l0605020112/article/details/41911865