[Gllug] port forwarding

t.clarke tim at seacon.co.uk
Fri Jun 24 10:10:01 UTC 2005


Hi Guys
I have tried googling and applying the schemes suggested for port-forwarding,
but without success.

The problem is basically that when our main internet circuit is down, I need
to be able to give certain customers acces to the web server via an alternate
ADSL circuit which is connected to another linux (debian) box.

The Vigor router unfortunately will not port-forward directly to the web-server
box (which is on a different IP address range), so I have set up the Vigor to
accept port 80 connections and forward them to its local linux box.  This part
works OK.   Where things go wrong is I cannot set up port-forwarding from the
debian ADSL box (uses iptables) to the weberserver box.  When I tried it, it
looked very much as if the incoming packets were being directed to the webserver
box but the replies were going nowhere.  Maybe another rule is needed.
The rules I used were:
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j DNAT --to  \
 192.168.n.n:80
iptables -A INPUT -p tcp -m --state NEW --dport 80 -i eth0 -j ACCEPT


Any suggestions would be appreciated.


In the meantime I am using an almighty kludge of a small 'c' program listening
on port 80 the ADSLdebian machine and then sending them on to the other machine
and then passing the replies back.  It seems to work, but is clumsy and only one
port80 connection can be open at a time.

Thanks

Tim

--------------------------------------------------------------------------------
This E-Mail (and any files transmitted with it) is intended solely for the use
of the individual or entity to whom it is addressed. If you have received it in
error please notify the sender and delete the message.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list