A port forwarding puzzler
Jerome Petazzoni
skaya@enix.org
Tue, 18 Dec 2001 23:39:52 +0100 (CET)
> Forwarding for port 80 and 25 works
> perfectly. But for ssh (here coming in as 2222) and
> imaps (993), it only partly works. It works from some
> places, but not from others.
you should try to use tcpdump to check that packets are
coming up to your host, and not blocked by some firewall
in-between.
> Also, I have a dynamic ip address on a cable modem.
> Is there someway to handle where I have the $LOCALIP
> better so that I don't have to keep rerunning the
> script everytime my ip address changes. If I take it
> out, none of the forwarding works anymore.
you could use just a little chain before every other rules,
to check that packet coming on eth0 have the right IP
address, and then setup this chain using some "post-up"
script, triggered by the DHCP client (if your IP is
assigned by DHCP).
Jerome Petazzoni <skaya at enix dot org>
--
'Somewhere, A Crime Is Happening,' said Dorfl.
(Feet of Clay)