From: Stroller <stroller@stellar.eclipse.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] OT: iptables w/ 2 web servers
Date: Thu, 24 Sep 2009 04:48:09 +0100 [thread overview]
Message-ID: <F217E1CC-B81D-47AB-80A5-562EF11527C4@stellar.eclipse.co.uk> (raw)
In-Reply-To: <loom.20090923T232252-112@post.gmane.org>
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.
next prev parent reply other threads:[~2009-09-24 3:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 21:35 [gentoo-user] OT: iptables w/ 2 web servers James
2009-09-23 21:49 ` kashani
2009-09-24 3:48 ` Stroller [this message]
2009-09-24 15:30 ` [gentoo-user] " James
2009-09-24 16:58 ` kashani
2009-09-24 17:58 ` Stroller
2009-09-25 12:40 ` Etaoin Shrdlu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F217E1CC-B81D-47AB-80A5-562EF11527C4@stellar.eclipse.co.uk \
--to=stroller@stellar.eclipse.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox