While working on localhost yesterday, I noticed that changes I’d make to the hosts file kept getting reverted. The hosts file wasn’t getting completely reset, only the most recent changes I’d made were lost. I’ve never had this problem before, so I thought, “What am I doing different today?” The only thing I could think of: using Cisco’s AnyConnect VPN client to connect to my work computer.
After it happened again this morning, I did a quick Google search for “cisco anyconnect resets hosts files.” Turns out AnyConnect is the problem. To solve it, you need to edit both hosts and hosts.ac. I agree with ANewBite: “Why AC generates another hosts file is either beyond my comprehension or really stupid.”
References
- /etc/hosts getting reset in Lion. Super User. http://superuser.com/questions/354902/etc-hosts-getting-reset-in-lion. Retrieved 20 February 2012.
- [SOLVED] hosts file keeps getting reset/rewritten, hosts.ac the culprit. Ubuntu Forums. http://ubuntuforums.org/showthread.php?t=1896148. Retrieved 20 February 2012.