From owner-freebsd-questions@FreeBSD.ORG Thu Sep 11 23:22:38 2008 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 E45901065673 for ; Thu, 11 Sep 2008 23:22:38 +0000 (UTC) (envelope-from mksmith@adhost.com) Received: from mail-defer02.adhost.com (mail-defer02.adhost.com [216.211.128.177]) by mx1.freebsd.org (Postfix) with ESMTP id 7DCB88FC1E for ; Thu, 11 Sep 2008 23:22:38 +0000 (UTC) (envelope-from mksmith@adhost.com) Received: from mail-in06.adhost.com (mail-in06.adhost.com [10.212.3.16]) by mail-defer02.adhost.com (Postfix) with ESMTP id A467C1748C3C for ; Thu, 11 Sep 2008 16:06:45 -0700 (PDT) (envelope-from mksmith@adhost.com) Received: from ad-exh01.adhost.lan (exchange.adhost.com [216.211.143.69]) by mail-in06.adhost.com (Postfix) with ESMTP id CA8B5164831 for ; Thu, 11 Sep 2008 16:06:44 -0700 (PDT) (envelope-from mksmith@adhost.com) MIME-Version: 1.0 x-pgp-encoding-format: MIME X-MimeOLE: Produced By Microsoft Exchange V6.5 x-pgp-encoding-version: 2.0.2 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="PGP_Universal_942AC050_94E5F121_C76402FC_ECD355DE" Content-class: urn:content-classes:message x-pgp-mapi-encoding-version: 2.5.0 Date: Thu, 11 Sep 2008 16:06:41 -0700 Message-ID: <17838240D9A5544AAA5FF95F8D52031604A63F67@ad-exh01.adhost.lan> In-Reply-To: <200809112249.05138.naylor.b.david@gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: /etc/hosts not working Thread-Index: AckUUi39WLDI6V5TSMyTgcI8aYSLxgAEI4nA References: <200809112249.05138.naylor.b.david@gmail.com> From: "Michael K. Smith - Adhost" To: "David Naylor" , X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: RE: /etc/hosts not working 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: Thu, 11 Sep 2008 23:22:39 -0000 --PGP_Universal_942AC050_94E5F121_C76402FC_ECD355DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: QUOTED-PRINTABLE Hello David: _____________________________________________ From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions= @freebsd.org] On Behalf Of David Naylor Sent: Thursday, September 11, 2008 1:49 PM To: freebsd-questions@freebsd.org Subject: /etc/hosts not working =09 * PGP Signed: 09/11/08 at 13:49:05 Hi, I am trying to redirect a URL request to a different address but it appea= rs=20 that /etc/hosts is not doing the job. Example: 127.0.0.1 google.com The way I understand it is that by typing google.com in a web browser it= =20 should result in the local page being displayed. It instead goes to the= =20 proper Google page. =20 `ping google.com' actually pings 127.0.0.1 but `host google' returns the= =20 actual IP addresses for google. =20 /etc/nsswitch.conf has `hosts: files dns' and host.conf has `hosts\n dns' Any idea why the system calls are not honouring /etc/hosts? Regards David * David Naylor * 0xFF6916B2 =09 man host shows that the host utility is specifically for DNS-resolved looku= ps and looks at /etc/resolv.conf, not /etc/hosts Regards, Mike --PGP_Universal_942AC050_94E5F121_C76402FC_ECD355DE Content-Type: application/pgp-signature; name="PGP.sig" Content-Transfer-Encoding: 7BIT Content-Disposition: attachment; filename="PGP.sig" -----BEGIN PGP SIGNATURE----- Version: 9.9.0 (Build 397) iQEVAwUBSMmkgfTXQhZ+XcVAAQglDgf8DaYjyQrmxJmKg7KibsorMfm82IKJ4e1s cD/bI2pWRM5SKKutgdAfQHbZp5IjgkjiMtkS589GfYAm2LRdTMoN9uAtk6xzRBrj 8YZdLZsJBFsX+84oQ6n2fPTIBWsqYSq6Mwod/X7f+1bXSnM/WnqaMtgBz6F4dd7F uc4fDzlW1gKkNLvVPXSLF4XeNsj4k+8alNJ5IAjEO9F72toPIBxubVhPtBQEP9AO wK0cQF80qe7Ntuctm55ueY3sm0/NrlbX6cWIiDcQX43+T1JiXUPhJmYaIAn5q4yp jdOJzeBbrxgJ+Y0JF65ZXG4YYKSNHtst0a9W/Xf7AmCZ9hmJ37Ifjg== =9HvA -----END PGP SIGNATURE----- --PGP_Universal_942AC050_94E5F121_C76402FC_ECD355DE--