iptables DNAT question
From: Claudio Nieder (private_at_claudio.ch)
Date: 11/21/03
- Next message: Rob van der Putten: "Re: Sites that block dynamic/dialups"
- Previous message: Francesc Llop: "Re: bind difficulties"
- Next in thread: Tim Sampson: "Re: iptables DNAT question"
- Reply: Tim Sampson: "Re: iptables DNAT question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Nov 2003 04:59:23 -0800
Hi,
this command gives me an error I don't understand:
# iptables -t nat -A OUTPUT -p tcp -d 80.254.169.102 --dport 25 -j
DNAT --to-destination 80.254.169.102:8025
iptables: Invalid argument
(If word wrapping mangels it: The whole command was entered on one
line)
If I supply all before -j DNAT, than iptables makes an entry, so the
first arguments are probably right:
# iptables -t nat -A OUTPUT -p tcp -d 80.254.169.102 --dport 25
# iptables -L -t nat -vn
...
Chain OUTPUT (policy ACCEPT 40 packets, 2458 bytes)
pkts bytes target prot opt in out source
destination
0 0 tcp -- * * 0.0.0.0/0
80.254.169.102 tcp dpt:25
# iptables -t nat -D OUTPUT 1
# iptables -L -t nat -vn
...
Chain OUTPUT (policy ACCEPT 40 packets, 2458 bytes)
pkts bytes target prot opt in out source
destination
When I ask for help on the DNAT arguments I get this explanation:
# iptables -t nat -A OUTPUT -p tcp -d 80.254.169.102 --dport 25 -j
DNAT --help
iptables v1.2.9
...
DNAT v1.2.9 options:
--to-destination <ipaddr>[-<ipaddr>][:port-port]
Address to map destination to.
(You can use this more than once)
Which to me, looks like what I am trying to do. Yet when I add the
--to-destination argument I get
# iptables -t nat -A OUTPUT -p tcp -d 80.254.169.102 --dport 25 -j
DNAT --to-destination 80.254.169.102:8025
iptables: Invalid argument
Please help me to spot my error.
FYI: This is on a gentoo Linux
# uname -a
Linux garfield.inodes.ch 2.4.22-ac4 #5 Thu Nov 6 22:05:47 CET 2003
i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.40GHz GenuineIntel
GNU/Linux
Many thanks
claudio (private@claudio.ch)
- Next message: Rob van der Putten: "Re: Sites that block dynamic/dialups"
- Previous message: Francesc Llop: "Re: bind difficulties"
- Next in thread: Tim Sampson: "Re: iptables DNAT question"
- Reply: Tim Sampson: "Re: iptables DNAT question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|