[rhelv6-list] How to get rid IPv6 address for localhost in /etc/hosts

Brown, Hugh M hugh-brown at uiowa.edu
Mon May 5 15:31:07 UTC 2014



-----Original Message-----
From: rhelv6-list-bounces at redhat.com [mailto:rhelv6-list-bounces at redhat.com] On Behalf Of Stromas, Aaron
Sent: Thursday, April 17, 2014 8:38 AM
To: rhelv6-list at redhat.com
Subject: [rhelv6-list] How to get rid IPv6 address for localhost in /etc/hosts

Greetings,

 

On reboot an IPv6 address for the localhost is added to the /etc/hosts:

 

::1 <hostname>.<domain> <hostname> localhost6.localdomain6 localhost6

 

The problem is that I have a system started from /etc/init.d/ which fails resolving the IPv6 address of the localhost.

I have already disabled IPv6 following https://www.redhat.com/archives/rhelv6-list/2011-March/msg00021.html <https://www.redhat.com/archives/rhelv6-list/2011-March/msg00021.html> .

 

I tried a little trick copying replacing the /etc/hosts file from /etc/init.d/network which works when I restart network

Service using "service network restart" but after each reboot the blasted line reappears in /etc/hosts.

 

Can anyone offer a real solution? TIA

 

Best regards,

 

-aaron

 


Sounds like network manager is putting the file back. Recursively grep for localhost6 in /etc and you should see some files that have it listed that can be corrected.

You can also add 'ipv6.disable=1' to your grub.conf kernel line to disable ipv6.

Hugh




More information about the rhelv6-list mailing list