LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Disable IPv6 From CentOS 7 (https://www.linuxquestions.org/questions/centos-111/disable-ipv6-from-centos-7-a-4175525918/)

carlosinfl 11-19-2014 03:18 PM

Disable IPv6 From CentOS 7
 
I'm trying to disable IPv6 completely from CentOS 7 running Systemd and would like some guidance on how officially this is done. I'm asking here because my confusion is if I simply need to do:

Code:

echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
or

Do I need to call ALL interfaces as well on my box because...and I quote from Arch Linux (yes CentOS is not Arch Linux):

Quote:

Note that you must list all of the targeted interfaces explicitly, as disabling all.disable_ipv6 does not apply to interfaces that are already "up" when sysctl settings are applied.
So would my /etc/sysctl.conf look as follows assuming my only two interfaces on the box are loopback (lo) and eth0 (enp0s25):

Code:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp0s25.disable_ipv6 = 1


Ihatewindows522 11-19-2014 03:26 PM

Quote:

Originally Posted by carlosinfl (Post 5272098)
I'm trying to disable IPv6 completely from CentOS 7 running Systemd and would like some guidance on how officially this is done. I'm asking here because my confusion is if I simply need to do:

Code:

echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
or

Do I need to call ALL interfaces as well on my box because...and I quote from Arch Linux (yes CentOS is not Arch Linux):



So would my /etc/sysctl.conf look as follows assuming my only two interfaces on the box are loopback (lo) and eth0 (enp0s25):

Code:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp0s25.disable_ipv6 = 1


It looks like you don't have a GUI installed, is that correct?

Might find this helpful
http://www.itzgeek.com/how-tos/linux...#axzz3JYIbUu7W

szboardstretcher 11-19-2014 03:49 PM

Once you have disabled,. you can test from here.
http://ipv6-test.com/


All times are GMT -5. The time now is 01:53 PM.