cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

os:linux:network:disble-ipv6.html



IPv6 - How do I disable IPv6 on Linux?

Note

  • snmpnetstat does not show ipv6 addresses, routes, and services.


Check IPv6

# ip a |grep inet6
# ifconfig |grep inet6


Ubuntu

Ubuntu 20.04 18.04 16.04

$ sudo vi /etc/sysctl.conf
....
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
....
$ sudo sysctl -p


RHEL/CentOS

RHEL/CentOS 8

nmcli connection modify xxx ipv6.method ignore

nmcli connection modify ens1 ipv6.method ignore
nmcli connection modify enp0s3 ipv6.method ignore


RHEL/CentOS 7

/etc/sysctl.conf or /etc/sysctl.d/disableipv6.conf

# vi /etc/sysctl.conf
...
net.ipv6.conf.all.disable_ipv6 = 1
...

# sysctl -p
temporally
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

or

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1


RHEL/CentOS 5.X / 6.X




os/linux/network/disble-ipv6.html.txt ยท Last modified: 2021/03/08 by admin

Page Tools