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/hoststhen add
127.0.0.1 0fees.netto 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).
... 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.