[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: can iptables distinguish difference between domains?



On Wed, 9 Mar 2005 11:33:46 -0800 (PST), Shannon R.
<shannon_mtbikes@yahoo.com> wrote:
> good day list!
> 
> we have limited public IPs and we're trying to run as
> many web servers behind 1 public IP as we can.
> 
[snip]
> that is, will the ff 2 iptables directives be able to
> correctly send deb1 requests to the first private box,
> and deb2 requests, to the other private box?
> 
> # iptables -t nat -I PREROUTING -i eth_ext -p tcp
> --dport 80 -d deb1.debian.org -j DNAT --to 172.16.1.1
> 
> # iptables -t nat -I PREROUTING -i eth_ext -p tcp
> --dport 80 -d deb2.debian.org -j DNAT --to 172.16.1.2
> 
> many thanks!
> sh

If you'll run iptables-save | less, you'll see that each of these
rules will squash the supplied domain names to their resolved IP
addresses, which as you suggest are both the same.

It sounds like you're in need of mod_proxy setup as a reverse proxy,
and is described at
http://httpd.apache.org/docs/mod/mod_proxy.html#forwardreverse.  There
was some oddball mod_passback at one point, but that may just be my
imagination at this point.

Thank you,


Scott Edwards
-- 
Daxal Communications - http://www.daxal.com
Surf the USA - http://www.surfthe.us



Reply to: