OCI: How to Disable IPv6 on Oracle Linux
Applies To:
Oracle Linux Cloud Service - Version Oracle Linux 7.0 and later
Oracle Cloud Infrastructure
Goal:
This document explains steps to disable IPV6 in Oracle Linux 7 and later.
Solution:
Method 1: To disable IPv6 for all interfaces and for their default states via sysctl.
- On-the-fly change:
# sysctl -w net.ipv6.conf.all.disable_ipv6=1
# sysctl -w net.ipv6.conf.default.disable_ipv6=1
- Or persistent change:
$ sudo vi /etc/sysctl.conf
…
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
$
$ sudo sysctl -p
$
Method 2: To disable IPv6 for one interface via sysctl.
- On-the-fly change (choose the correct interface name):
0