From owner-freebsd-questions@FreeBSD.ORG Tue Dec 11 15:15:31 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F2DF16A419 for ; Tue, 11 Dec 2007 15:15:31 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: from smtp.teledomenet.gr (smtp.teledomenet.gr [213.142.128.2]) by mx1.freebsd.org (Postfix) with ESMTP id 148E413C458 for ; Tue, 11 Dec 2007 15:15:30 +0000 (UTC) (envelope-from nvass@teledomenet.gr) Received: by smtp.teledomenet.gr (Postfix, from userid 58) id E62C1142329; Tue, 11 Dec 2007 17:15:29 +0200 (EET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on smtp.teledomenet.gr X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from iris (unknown [192.168.1.71]) by smtp.teledomenet.gr (Postfix) with ESMTP id 2B3ED142354; Tue, 11 Dec 2007 17:15:25 +0200 (EET) From: Nikos Vassiliadis To: freebsd-questions@freebsd.org Date: Tue, 11 Dec 2007 17:18:05 +0200 User-Agent: KMail/1.9.7 References: <475E0190.7030909@pacific.net.sg> In-Reply-To: <475E0190.7030909@pacific.net.sg> X-NCC-RegID: gr.telehouse MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200712111718.05876.nvass@teledomenet.gr> Cc: Erich Dollansky Subject: Re: performance impact of large /etc/hosts files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 15:15:31 -0000 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