• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 7 : How to disable IPv6 on a specific interface only

By admin

We have already seen how to disable ipv6 globally on CentOS / RHEL 7. There could be an ask to disable ipv6 just for a particular interface on the system and not for all the available interfaces or system wide. The posts describe steps to disable ipv6 on a particular interface in CentOS / RHEL 7.

Note : Adding IPV6INIT=no in the specific interface configuration files is not helpful and it does not disable ipv6 on that interface.

Disabling ipv6 on a particular interface only

1. Below ipv6 parameter can be used on per interface basis to enable or disable ipv6.

net.ipv6.conf.[interface].disable_ipv6 = [value]

Here,
interface – name of the inerface where ipv6 needs to be disabled. For example eth1
value – 0 (enable) or 1 (disable) ipv6 on the interface.

2. So to disable ipv6 just on eth1 interface, you can add below parameter in /etc/sysctl.conf file to make permanent changes.

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

3. Run below command to apply the changes immediately;

# sysctl -p

Conclusion

It is not helpful to add IPV6INIT=no parameter to interfaces that need to disable IPv6. Link local ipv6 can still be seen on that interface. Changing the sysctl parameter for the specific interface can disable the ipv6 on that particular interface only and not globally on the system.

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to configure alias (virtual interface) of bond interface (bondx:y)
  2. CentOS / RHEL 7 : Configuring static IP adress using network interface configuration files
  3. How to Create yum Repository in CentOS/RHEL
  4. How to configure Partitioned Block Devices (Non-ASMLIB) And Assign Them To ASM
  5. CentOS / RHEL 7 : How to configure kdump using GUI
  6. CentOS / RHEL 7 : systemd-analyze command to find booting time delays
  7. Linux OS Service ‘vncserver’
  8. CentOS / RHEL 7 : Understanding Kexec and Kdump
  9. Sample /etc/services file in Linux
  10. Linux OS Service ‘microcode_ctl’

You May Also Like

Primary Sidebar

Recent Posts

  • Basics of client connectivity in Oracle Data Guard configuration
  • ORA-354 ORA-353 and ORA-312: Possible corruption in Online Redo Log File Members in a Redo Log Group
  • How to relocate the redo log files to a different location on disk
  • Oracle Database: Redo log operations (Add/Drop/Change Location)
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary