From owner-freebsd-hackers Wed Oct 20 9:55:15 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from boromir.vpop.net (dns1.vpop.net [206.117.147.2]) by hub.freebsd.org (Postfix) with ESMTP id 5E45714A01 for ; Wed, 20 Oct 1999 09:55:13 -0700 (PDT) (envelope-from mreimer@vpop.net) Received: from vpop.net (bilbo.vpop.net [216.160.82.65]) by boromir.vpop.net (8.9.1/8.9.1) with ESMTP id JAA04740 for ; Wed, 20 Oct 1999 09:55:12 -0700 (PDT) Message-ID: <380DF3F3.E22CFAF8@vpop.net> Date: Wed, 20 Oct 1999 09:55:15 -0700 From: Matthew Reimer Organization: VPOP Technologies, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.3-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: Class C hack instead of ifconfig aliases References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here's a way to do it without patches: 1. in your webserver: a. ipfw add fwd localhost from any to 1.2.3/24 http b. add sections, like this: ServerName web.freebsd.org ServerAdmin webmaster@freebsd.org DocumentRoot /home/web 2. in your router: add a route to forward 1.2.3/24 to your webserver Pros: - no need to 'ifconfig xyz alias...'. - address matching is fast, since only a few ipfw rules are checked, rather than lists of hundreds or thousands of IP addresses Cons: - I don't think arp will work on 1.2.3/24 addresses, which is why the route needs to be added to the router. Try it: it really works, thanks to Julian Elischer. Matt Geoff Buckingham wrote: > > On Wed, Oct 20, 1999 at 11:02:08AM +0100, Nick Hilliard wrote: > > > What do you mean by "bind a class C"? Make an interface so it will > > > respond to incoming requests for 10.1.2.x? ewww, yuck! > > > > Is it any less elegant than having in_localaddr() trawling through each item > > on the address list? Perhaps 1024 items if you've got a large vweb server? > > That's also pretty inelegant. > > > > The patch refered to elsewhere comes from Demon Internet where it was (at least > in my time) used to two /18s and a /16 without problems, this would have > been completely impractical through more conventional means. > > As I continue to work with large scale virtual hosting set ups I would quite > like to see this enter the main source tree, allthough I guess people likely > to make use of it are a very small minority. > > In an effort to avoid what may follow, I fully appreciate HTTP 1.1 vhosting > is much more appropriate in many situations, this does not however > remove the need for large scale conventional virtual hosting alltogether. > > -- > GeoffB > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message