[Nottingham] Port forwarding with iptables

Robert Davies nottingham at mailman.lug.org.uk
Tue Apr 29 16:11:39 2003


On Tuesday 29 Apr 2003 15:42, Steve Goodliff wrote:

> Please can anyone help me out with my latest linux networking conundrum

Hi Stevie!!

> I have a redhat 8.0 machine with 3 NIC's. 2 of them are connected to ADSL
> routers and the 3rd to our internal network.
>
> Both routers have web front ends which I would like to access by connecting
> to the redhat box and then move onto some sort of balancing traffic across
> the 2.

Have you enabled IP forwarding, and are clients on your internal network setup 
with a default route to the Red Hat box?  I assume you try to access the web 
admin pages on the routers first.  For the 2nd part of your question, you'll 
likely need to use Advanced routing HOWTO, the ip command in iproute2 package 
allows various balancing strategies.  You may find simply defining 2 default 
routes on the Red Hat box suffices, IIRC it's a configurable kernel option to 
treat them with equal weighting which RH may set or not.

Rob