Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2007 17:18:05 +0200
From:      Nikos Vassiliadis <nvass@teledomenet.gr>
To:        freebsd-questions@freebsd.org
Cc:        Erich Dollansky <oceanare@pacific.net.sg>
Subject:   Re: performance impact of large /etc/hosts files
Message-ID:  <200712111718.05876.nvass@teledomenet.gr>
In-Reply-To: <475E0190.7030909@pacific.net.sg>
References:  <475E0190.7030909@pacific.net.sg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 11 December 2007 05:18:40 Erich Dollansky wrote:
> Hi,
>
> I wonder what the performance impact of the entries in /etc/hosts really
> is.
>
> What is your experience?
>
> Google tells me a lot of hosts running FreeBSD but I could not find
> anything regarding the hosts file itself.
>
> I use hosts for filtering all unwanted content on my personal machine.

That's not apparent. What are your filtering?
and how do your filter using /etc/hosts?

=46rom "man hosts":
DESCRIPTION
     The hosts file contains information regarding the known hosts on the n=
et-
     work.  It can be used in conjunction with DNS, and the NIS maps
     `hosts.byaddr' and `hosts.byname', as controlled by nsswitch.conf(5).

=46or example, my computer's name is iris.teledomenet.gr. This
is not a fully qualified hostname. It's not in the Domain
Name System. So, I have to enter this information manually
to my /etc/hosts, so my OS will know that iris.teledomenet.gr
is the local host. Example /etc/hosts:

192.168.1.71 iris iris.teledomenet.gr

I recall that before DNS(that's a long time ago) the mapping
between IP addresses and hostnames was achieved using /etc/hosts.
And one could get a hosts file from a well known place(IANA?)

The only "filtering" I can imagine of, is using something like
127.0.0.1 badhosts.com
But all you get is misinforming *your* resolver that
badhosts.com is on 127.0.0.1, that is, *you* cannot
connect to badhosts.com.
badhosts.com can connect to your machine just fine.
And I doubt that's what you want.

Please, clarify a bit.

Nikos



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712111718.05876.nvass>