In Snow Leopard I blocked malware sites by editing the hosts file - /private/etc/hosts. I cannot get it to work the same way in Lion, in spite of reading up on the various issues people are reporting for Lion and hosts. For example, to block 0fees.net:
sudo nano /private/etc/hosts
then add127.0.0.1 0fees.net
to the beginning of the hosts file (instead of at the end, which was the usual way pre-Lion).dscacheutil -flushcache
(though most authors say this is not required).
To test:
ping 0fees.net
... which then looks up the DNS and pings the host instead of returning 127.0.0.1. Rebooting seems to have no effect. How can I get blocking working again?
This is from a clean installation, not an upgrade from Snow Leopard.
fe80::1%lo0 localhost
line.f380::1%lo0 localhost
line, and they work fine.