NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Why doesn't NetBSD recognize my entries in /etc/hosts?

On 16 September 2015 at 19:06, Johnny Billquist <> wrote:
> On 2015-09-16 19:09, Ottavio Caruso wrote:
>> RE:
>> I put domains that I want to block in /etc/hosts preceded by
>> but I can still ping them.
>> I rebooted, but I can still ping them.
>> Then I have mass-changed all entries from to and I
>> can still ping them.
>> Rebooted, same thing.
>> Why can I do this effortlessly with Windows and Linux but not with NetBSD?
> First of all, using /etc/hosts as a way of block domains is extremely
> unreliable and not really a meaningful way of actually block anything.

Why? It works on other platforms?

> Second, I guess you haven't heard of /etc/nsswitch.conf. It also exists in
> Linux. It tells which methods are used, and in which order. It might be that
> you have dns before files.

I've checked my nsswitch.conf, it's files before hosts

> Changing a destination to, and then pinging it, why would you
> expect it to not work. will most likely respond to pings.
> Pinging will also give some result. Most probably your default
> gateway machine.

Yes, I didn't express myself correctly. I meant that I ping the
original host, not

BTW, rebooting TWICE produced the intended result. I wonder why I had
to reboot twice.

> Maybe you should try and learn about /etc/hosts.deny as well as ipfilters?

But again, why?

If I have a list of 300 domains to block, this would not be practicable.


Home | Main Index | Thread Index | Old Index