Skip to contentSkip to conversation

iptables 1.2.6a

DISCUSSION Alexandre Carlos 2 participants 2 messages Oct 10, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

i want to add a rule to the iptable as follow

iptables -t nat -A PREROUTONG -s 10.1.1.2 -d 192.168.67.91 -p tcp -dport 23 -j DNAT --to-destination 192.168.1.1

but i´m receiving the following error message multiple -d flags not allowed.

I usind RH 7.2 iptables 1.2.6a, and i want to know how can i fix this? Do i have to change the iptables version? Is this a common error message?

[]s

Alex

#1 lore raw

Good day, Alexandre,

Quoted 6 lines · Alexandre Carlos

i want to add a rule to the iptable as follow

iptables -t nat -A PREROUTONG -s 10.1.1.2 -d 192.168.67.91 -p tcp -dport 23 -j DNAT --to-destination 192.168.1.1

but i´m receiving the following error message multiple -d flags not allowed.

This needs to be --dport (note two dashes).
BTW, was "PREROUTONG" a cut-and-paste error, or was that the
actual text you used in the command? It should be "PREROUTING".
Cheers,
- Bill

---------------------------------------------------------------------------
"Democracy is three wolves and a sheep voting on what's for
dinner."
(Courtesy of "D'Arcy J.M. Cain" <[email protected]>)
--------------------------------------------------------------------------
William Stearns ([email protected]). Mason, Buildkernel, named2hosts,
and ipfwadm2ipchains are at: http://www.stearns.org
--------------------------------------------------------------------------