HexEditing With VI

Needing a good HexEditor in Linux? VI can do the job. Though it is not a true “hex mode” in Vi, it will accomplish the same method by stream vi’s buffer through the external program ‘xxd’. The following is the process to use

Open the file in VI. Hit escape and type:
:%!xxd [ to switch into hex mode ]

At the end, hit escape again and type:
:%!xxd -r [ to exit from hex mode ]

Hosts File Overwritten and Cisco AnyConnect

Using RedHat Enterprise Linux at work, one of the things I have had to do is edit my hosts file in /etc/hosts.

The problem I started having was that my hosts file kept getting re-written over with a default file, so any changes I made disappeared.

Eventually after going through various hosts* files, I noticed there was a non-standard file in there called hosts.ac. Turns out, this is a hosts file that is created by Cisco’s AnyConnect and whatever is in this file rewrites my hosts file.

The quick fix? Make all the hosts file changes to the hosts.ac file. That way, it is copied over to the hosts file. The “true” fix.. well, I am still working on that one.

I even deleted the hosts.ac file and tried renaming it. But, nonetheless, if the Cisco AnyConnect program is restarted (it doesnt even have to connect, just restarted) it will rebuild the hosts.ac file yet again and you are back to square 1.

So for now, just edit the hosts.ac file and it will copy over to the hosts file.

*update*
Looking through /var/log/messages I did notice that there is a service I am curious about when starting up Cisco AC

acvpnui