On 23 Sep 2009, at 22:35, James wrote:
...
I have one static IP
... Could someone post
some simple iptable examples of how to route 2 different
web server traffic streams to 2 different machines?
Both are inside the same DMZ....2 different machines
with different (NAT) IP addresses.
Can't be done.
Inherently, a client requesting a webpage looks up the IP address for
bigbreastedmommas.com, finds its 24.73.161.102 (or whatever) and send
an http request to port 80 of that IP.
There is no way for IPtables to distinguish between an http request to
bigbreastedmommas.com at 24.73.161.102 and an http request to
bouncyboobs.com at 24.73.161.102, assuming both are on port 80.
I would LOVE to be proved wrong on this, because it would be immensely
useful for NATted geeks. However an iptables module to do this
certainly did not exist in the past, and I'm guessing there are
protocol-specific reasons why it can't be done.
What you can do is forward port 80 to one machine and have that proxy
to the other when necessary. Or have it redirect to the other, which
listens on port 81.
Stroller.