[Gllug] Portforwarding failure - iptables question
Adrian McMenamin
adrian at mcmen.demon.co.uk
Mon Jun 20 15:15:16 UTC 2005
This is a fragment from /etc/sysconfig/iptables:
*nat
-A POSTROUTING -s 192.168.62.0/255.255.255.0 -j MASQUERADE
-A POSTROUTING -s 192.168.63.0/255.255.255.0 -j MASQUERADE
#setup bittorrent
-A PREROUTING -p tcp --dport 62000 -i eth1 -j DNAT --to-destination
192.168.63.22:62000
#setup DELL box as webserver
-A PREROUTING -p tcp --dport 80 -i eth1 -j DNAT --to-destination
192.168.63.32:80
COMMIT
It gives this output:
[root at electra sysconfig]# iptables-restore -v ./iptables
Flushing chain `PREROUTING'
Flushing chain `POSTROUTING'
Flushing chain `OUTPUT'
#setup bittorrent
#setup DELL box as webserver
iptables-restore v1.2.6a: Unknown arg `--dport'
Try `iptables-restore -h' or 'iptables-restore --help' for more
information.
(NB: Because of the way I set this box up - it was just being used
internally as an AP and then I added the external interface eth1 is the
outside world if)
However, if I remove one of the portforwarding lines (doesn't matter
which one) it works.
This is quite an old version of iptables - the box is running RH 7.3
with a custom built kernel:
[root at electra sysconfig]# iptables -V
iptables v1.2.6a
Is it broken iptables or have I got something wrong?
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list