10.7: Adding entries to the Cisco AnyConnect hosts file

Oct 11, '11 07:30:00AM

Contributed by: Anonymous

I have been having problem adding entries into the OSX Lion's /etc/hosts file. I found that my entries into the /etc/hosts file only stuck around until I rebooted, then the /etc/hosts file would revert back to the default entries. My changes to the file were lost.

[crarko adds: This hint has been found to be specific to users of Cisco AnyConnect VPN client, and does not affect you otherwise. ]

In order to add your entries and make it stick in the /etc/hosts file, what you need to do is:

If you make edits to the /etc/hosts file (like you do for Unix/Linux) your entries will not stick around after a reboot. You need to edit the /etc/hosts.ac file instead.

[crarko adds: I'm not sure about this one. I looked, and didn't see any /etc/hosts.ac file, and a search didn't reveal much of anything. Any of you folks out there who make modifications to hosts; when you've made changes under Lion do they stick or do you see the same kind of thing as this hint's author? And have any of you observed the hosts.ac file? I'd like to know where that comes from.]

Comments (15)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20111011050950471