Date: Thu, 03 Feb 2000 11:00:47 +0100 (MET) From: Martin Machacek <mm@i.cz> To: freebsd-net@freebsd.org Subject: Re: Can 3.4-S cope with packets not addressed to it? Message-ID: <XFMail.000203110047.mm@i.cz> In-Reply-To: <Pine.BSF.4.05.10002030920510.26330-100000@plato.salford.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03-Feb-00 Mark Powell wrote: > Hmmm. Hadn't though of that. Now how many web servers are there in the > world. Could you provide a list and I'll start setting the aliases up. > Seriously, is there any way to get FreeBSD to accept any IP packets? You cannot use alias address on any of your interfaces since you won't be able to reach the real server to fetch the content into your cache. However, you can use the ipfw fwd ... rule to feed the request to your cache (squid?) no matter what IP address is the packet header. The cache can then use the getsockname call to find out the "real" address and fetch the content from the real server. If you're using some recent version of squid it should work out of the box (just add the ipfw fwd rules). In order to redirect all HTTP requests to the cache you should add something like this: ipfw add 1000 fwd 127.0.0.1,3128 tcp from <your_net> to any 80 in via <your_eth> assuming yor web cache listens on 127.0.0.1 port 3128. You should substitute addresses of your clients for <your_net> (e.g. 10.0.0.0/8) and name of your ethernet interface for <your_eth> (e.g. fxp0). It is critical that you put the "in" keyword in the rule in order to avoid loops triggered by your cache trying to fetch the content from the real server. See man 8 ipfw for more. If you're using squid as the cache you could eventually use WCCP to redirect HTTP requests to it. Recent version of squid support it out of the box you only have to configure the address of your "home router". However your router has to support WCCP. All Ciscos (with IOS 11.2 and higher) do. Don't know about 3Com. WCCP is Cisco invention :-). Martin --- [PGP KeyID F3F409C4] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000203110047.mm>