[CentOS] How to disable ipv6

Charles Bearden Charles.F.Bearden at uth.tmc.edu
Wed Nov 28 18:25:18 UTC 2012

Hi all,

I'm pretty new to CentOS. I am working with a newly set-up server:

[cbearden at host ~]$ lsb_release -a
LSB Version: 
Distributor ID:	CentOS
Description:	CentOS release 6.3 (Final)
Release:	6.3
Codename:	Final

I'm trying to solve this problem (X11 forwarding)
for myself.

But disabling ipv6 and adding

   AddressFamily inet

to my sshd config didn't fix the problem. Oddly enough, the output of

   netstat -an

suggests that ipv6 is still enabled:

   tcp        0      0 :::22                       :::*                   LISTEN

even though

   [cbearden at PostgreSQL ~]$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

This is after a reboot. Am I right that the /proc file suggests that ipv6 is 
disabled while netstat suggests that it isn't?

Chuck Bearden
Programmer Analyst IV
The University of Texas Health Science Center at Houston
School of Biomedical Informatics
Email: Charles.F.Bearden at uth.tmc.edu
Phone: 713.500.9672

More information about the CentOS mailing list