LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-19-2014, 03:18 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
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
 
Old 11-19-2014, 03:26 PM   #2
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by carlosinfl View Post
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

Last edited by Ihatewindows522; 11-19-2014 at 03:28 PM.
 
Old 11-19-2014, 03:49 PM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't disable IPv6 bhamid Linux - Networking 10 04-30-2013 02:13 AM
How to disable ipv6? ms-trex Slackware 7 12-13-2012 04:20 PM
Best Way to disable IPV6 idlehands Linux - General 6 12-04-2012 09:58 AM
How to disable ipv6 on NetBSD? Lord Estraven *BSD 3 11-22-2008 03:42 AM
Disable IPV6 bjb_nyj101 Linux - Software 2 06-07-2007 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration