Tuesday, December 7, 2021

How to Disable IPV6 on Oracle Linux 7

 Applies To: 

Linux OS - Version Oracle Linux 7.0 and later

Target: 

Disable IPV6 on Oracle Linux 7. 

Solution

Method 1: 

Append below lines in /etc/sysctl.conf then reboot:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Then make the settings effective:

# sysctl -p


Method 2: 

Edit /etc/default/grub and add ipv6.disable=1 in line GRUB_CMDLINE_LINUX, e.g.:

# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

Regenerate a GRUB configuration file and overwrite existing one:

# grub2-mkconfig -o /boot/grub2/grub.cfg


Restart the system and verify no line "inet6" in "# ip addr show" output.


Ref: Doc ID 2078115.1

No comments:

Post a Comment

How to Disable IPV6 on Oracle Linux 7

 Applies To:  Linux OS - Version Oracle Linux 7.0 and later Target:   Disable IPV6 on Oracle Linux 7.  Solution Method 1:   Append below lin...