From owner-freebsd-current@FreeBSD.ORG Fri Jun 30 22:00:52 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25EE016A605 for ; Fri, 30 Jun 2006 22:00:52 +0000 (UTC) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70C6D44127 for ; Fri, 30 Jun 2006 21:33:01 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id k5ULWxHh031940; Fri, 30 Jun 2006 14:32:59 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id k5ULWxUX031939; Fri, 30 Jun 2006 14:32:59 -0700 Date: Fri, 30 Jun 2006 14:32:59 -0700 From: Brooks Davis To: Garance A Drosihn Message-ID: <20060630213259.GA20670@odin.ac.hmc.edu> References: <4498D108.90907@rogers.com> <20060621053007.GA3320@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new Cc: Mike Jakubik , freebsd-current@freebsd.org, Justin Hibbits Subject: Re: ~/.hosts patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 22:00:52 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2006 at 08:09:53PM -0400, Garance A Drosihn wrote: > At 10:30 PM -0700 6/20/06, Brooks Davis wrote: > > > >It's useful for cases where you want to add shortcuts > >to hosts as a user or do interesting ssh port forwarding > >tricks in some weird cases where you must connect to > >localhost:port as remotehost:port due to client/server > >protocol bugs. >=20 > As far as interesting tricks for ssh, you should already > be able to do that with ~/.ssh/config. Note ~/.hosts > would only redirect the hostnames, and not ports. I use > ~/.ssh/config so that a plain '@host' request actually > goes to '@host:alternate-port', so-to-speak. I'm very familiar with .ssh/config and it's not sufficent for at least one server I know of. The problem is that the client must think it is connecting to server.fully.qualified.domain and do so by name because the name is passed to the server which misuses in in interesting ways. In particular, local servers can forward requests to remote servers and when "localhost" is passed the server makes new connections to "localhost" until the system runs out of file descriptors or socket buffers. The only way around this is to make server.fully.qualified.domain point to 127.0.0.1. What would actually be perfect in this case would be to modifiy getaddrinfo() to let you do host:port mappings as the DNS system designers obviously intended but never did beyond MX records, that's a whole different scope though. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFEpZiKXY6L6fI4GtQRAqP5AKDU2MaTwqc8gIkEgqhnkk+hqXH9lACdEjlY cNf6lxrxIW647XwDIVpipDs= =7DDg -----END PGP SIGNATURE----- --DocE+STaALJfprDB--