From owner-freebsd-questions Sun Feb 24 16:10:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 68F7A37B402 for ; Sun, 24 Feb 2002 16:10:06 -0800 (PST) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020225001006.GOHT1147.rwcrmhc52.attbi.com@blossom.cjclark.org>; Mon, 25 Feb 2002 00:10:06 +0000 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.6) id g1P0A1T29565; Sun, 24 Feb 2002 16:10:01 -0800 (PST) (envelope-from cjc) Date: Sun, 24 Feb 2002 16:10:01 -0800 From: "Crist J. Clark" To: Florian Nigsch Cc: Alex , freebsd-questions@FreeBSD.ORG Subject: Re: DNS? nat? Message-ID: <20020224161000.E83869@blossom.cjclark.org> References: <200202241748.g1OHmR701169@joeandlane.com> <20020224191736.C23097@nigsch.com> <17211615632.20020224195138@cybertron.tmfweb.nl> <20020224200942.A23686@nigsch.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020224200942.A23686@nigsch.com>; from flo@nigsch.com on Sun, Feb 24, 2002 at 08:09:42PM +0100 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Feb 24, 2002 at 08:09:42PM +0100, Florian Nigsch wrote: > On Sun, Feb 24, 2002 at 07:51:38PM +0100, Alex wrote: > > FN> On Sun, Feb 24, 2002 at 11:48:27AM -0600, Lane Holcombe wrote: > > >> I have successfully used nat to transfer incoming requests to the > > >> Windows box based upon port number, (e.g. www.mydomain.com:8080), > > >> but I can't seem to figure out how to do it based upon hostname (e.g. > > >> windows.mydomain.com). > > > FN> ---end quoted text--- > > FN> As far as I know you can only redirect adresses and ports with natd > > FN> based on the IP adress. What I am trying to say is that natd will > > FN> not know for which hostname the packet is destined which it should > > FN> redirect. It only knows of the IP number it runs on. So if you > > FN> have multiple hostnames on the same IP I personally think it's not > > FN> possible with natd to do redirecting based on hostname. Unlike > > FN> with apache where you can have multiple virtual hosts distinguished > > FN> by their URL. > > > > FN> Someone correct me if I am wrong... > > > > Its able to understand this (out of the man natd): > > > > redirect_port tcp www1:http,www2:http,www3:http www:http > > > ---end quoted text--- > > Thanks for correcting me, Alex! > > Seems to me that I am not really up to date with natd. I am using it for > over 3 years now for my home LAN and I remember also wanting to do something > the original mail was aksing for. Back then, I finished with the conclusion > that it wasn't possible... honestly, I think it's great that this works, be > it it ever worked or not! ;-) I think you are talking about different things. You are talking about the fact there is no way to redirect for virtual hosts, which is true. I think Alex is saying you can use hostnames in natd(8) configuration files and on the command line. This is true, but it has nothing to do with redirecting for virtual hosts. I'm not clear on what the original poster was asking, whether you can do NAT based on virtual hosts (no), or whether he was looking for the 'redirect_address' option. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message