LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can i disbale ipv6 on Centos 6.6 (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-disbale-ipv6-on-centos-6-6-a-4175529247/)

ASTRAPI 12-25-2014 06:47 PM

How can i disbale ipv6 on Centos 6.6
 
Hi

How can i disbale ipv6 on Centos 6.6 ?

Thanks

Head_on_a_Stick 12-25-2014 06:57 PM

I don't use CentOS, but I think this will work if you add it to your kernel command line parameters:
Code:

ipv6.disable=1

ASTRAPI 12-25-2014 07:32 PM

No idea how to do it :(

veerain 12-25-2014 09:10 PM

Use sysctl command to do it.

ASTRAPI 12-25-2014 09:40 PM

How?

It seems that Centos server 6.6 is trying to use always ipv6 (don't know why) and not ipv4 :(

unSpawn 12-26-2014 05:39 AM

Quote:

Originally Posted by ASTRAPI (Post 5290556)
How?

If you don't know what to look for and somebody gave you a hint then first reflex should be to use the standard local "which", "whatis", "whereis" and "locate" commands, or (the local copy of) the CentOS documentation and search LQ before resorting to using an online search engine. This is efficient. In your case the CentOS FAQ has an appropriate entry: http://wiki.centos.org/FAQ/CentOS6#h...6a8a10d41781df .

ASTRAPI 12-26-2014 09:24 AM

Ok thanks :)

Is there any other way to force all connections to use ipv4?

As if i use wget is not working for a file link and if i use wget -4 is working great for the same file link ?

unSpawn 12-26-2014 10:30 AM

Quote:

Originally Posted by ASTRAPI (Post 5290685)
if i use wget is not working for a file link and if i use wget -4 is working great for the same file link ?

That means you have not disabled IPv6 properly. (Re-)check /proc/cmdline, sysctl and /etc/sysctl.conf, (if|iw)config, lsmod, any /etc/mod*/ output / contents for anything IPv6-related.

ASTRAPI 12-26-2014 03:05 PM

I mean to do this with ipv6 enabled....

luvzlinux 12-26-2014 04:39 PM

There are a few ways to do this (ranging from simple to complex), including:

1. Adjust network settings.
2. Use /etc/sysctl.conf to adjust /proc/sys/ kernel parameters.
3. Blacklist kernel modules associated with IPv6.

Option 1: Adjust network settings

Add/ensure "NETWORKING_IPV6=no" to /etc/sysconfig/network
Add/ensure "IPV6INIT=no" to /etc/sysconfig/network-scripts/ifcfg-eth0 or similar (depending on interface).

Option 2: Adjust /etc/sysctl.conf

Add/ensure "net.ipv6.conf.default.disable_ipv6 = 1" is in /etc/sysctl.conf
Run "sysctl -p" to apply this changed setting from /etc/sysctl.conf configuration file
Alternatively, "echo 1> /proc/sys/net/ipv6/conf/default/disable_ipv6" ... but this won't persist after reboot.


All times are GMT -5. The time now is 06:51 AM.