[ale] Iptables/multiple web servers

Chris Egolf cegolf at ugholf.net
Fri Oct 3 14:15:16 EDT 2003


nick travis wrote:
> I need to run 2 web servers located on different machines, I'm using an
> Iptables firewall script and in the past I only had one web server so I
> just redirected all port 80 traffic to the server, how can I set this up
> in Iptables to direct to a certain server based on the web request?
> 
I'm guessing you only have one available 'real' IP address to work with, 
right?

Two thoughts come to mind, but I'm sure there are other ways.

1) There's an 'experimental' plugin for iptables that can examine 
packets for arbitrary text.  I forget what it's called, and it may even 
be part of the standard package now.  I can't find my reference to it at 
the moment. Sorry.

2) Use mod_rewrite to handle it.  However, you'll have to change the 
port when redirecting traffic to the 2nd server if you have only one IP.

Chris

-- 
============================================================================
                                Chris Egolf
              http://www.ugholf.net     cegolf[at]ugholf.net
============================================================================



More information about the Ale mailing list