I'm trying to use the /etc/hosts file for adblocking, but both firefox and opera seem to ignore it on my setup. I've messed around with this install a bit, but nothing with the networking.
I've searched the forums for a few reasons this might be happening - I've verified that the permissions on hosts and nsswitch.conf file allow them to be read by everyone (644).
I can successfully ping localhost, if that matters.
My hosts file looks like this, truncated of course, and it terminates in a blank line. The blank line didn't make a difference, but I read a post that suggested it would, so I added that. I also added the third entry 'test' just to verify that the hosts file wasn't being looked at at all, and it was unable to resolve through ping.
The contents of my nsswitch.conf127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
#start of lines added by WinHelp2002
# [Misc A - Z]
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
protocols: db files
services: db files
ethers: db files
rpc: db files
hosts.conf# Generated by NetworkManager
I'm a newbie to all of this, all the above information I got from searching the forums for this same request.. none of the resolutions I found helped me, though. If anyone has any ideas on how to fix this, please let me know!# The "order" line is only used by old versions of the C library.