Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'port forwarding' in 2.4

Skip to first unread message

Toby Gray

unread,
Aug 5, 2001, 12:45:03 PM8/5/01
to
I have managed to set up a masquerading box using suse 7.0 (with a few of
the newer packages like iptables etc. from suse 7.1) and a custom 2.4.7
kernel. It all works nice and happily, (after a little trouble with the
serial card) masquerading from my dun to my local network.

The only problem is setting up port forwarding, I can't for the life of
me work out how to get iptables to be set up (and just to be certain it
is port forwarding I mean) so that for the internet I am running (for
example) a webserver on port 80, when really it is on an internal machine
on port 8080. I have had several attempts at it, most resulting in bad
things happening in networking, and almost all the help on the net seems
to be for ipfwadm and 2.2.x and 2.0.x kernels.

Please can some one inform me of the 2 lines (I think its 2 one for doing
it and one for allowing it, something like that anyway :-)) which I will
need.

TIA

Toby

Nick West

unread,
Aug 12, 2001, 6:59:36 PM8/12/01
to
Hey toby. I think this is what you're looking for.

This will allow traffic to port 80 on your external card (assuming eth0 is
your external interface):
/sbin/iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT


This will forward any incoming traffic to port 80 on your external card to
ip 192.168.1.7 port 8080:
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to
192.168.1.7:8080


/Cheers


"Toby Gray" <toby...@ntlworld.com> wrote in message
news:QMeb7.7631$hs5.1...@news2-win.server.ntlworld.com...

0 new messages