Skip to contentSkip to conversation

Multiple -d flags

DISCUSSION Mattia Martinello 3 participants 3 messages Jan 11, 2003 – Jan 13, 2003

lore
Share & tools
lore
#0 lore raw

Hi

I wish to create a rule that allow a packet to a specified IP on a specified port.

The rule:

iptables -A FORWARD -s 0.0.0.0/0 -d 213.21.136.8/255.255.255.255 -dport 80 -j ACCEPT

shows me the following error:

iptables v1.2.5: multiple -d flags not allowed
Try `iptables -h' or 'iptables --help' for more information.

How I can solve my problem?

Thank you very much
Bye
Mattia

#1 lore raw
Quoted 12 lines · Mattia Martinello

Hi

I wish to create a rule that allow a packet to a specified IP on a specified port.

The rule:

iptables -A FORWARD -s 0.0.0.0/0 -d 213.21.136.8/255.255.255.255 -dport 80 -j ACCEPT

shows me the following error:

Quoted 10 lines

iptables v1.2.5: multiple -d flags not allowed
Try `iptables -h' or 'iptables --help' for more information.

How I can solve my problem?

Thank you very much
Bye
Mattia

You should specify --dport not "-dport"
REgards

Signature · 2 lines
Dharmendra.T
Linux Enthu
#2 lore raw
In reply to Mattia Martinello

hellow Mattia,

correct sintaxe is --dport, not -dport :)

test :

iptables -A FORWARD -s 0/0 -d 213.21.136.8 --dport 80 -j ACCEPT

bye

surf3r

Quoted 23 lines · Mattia Martinello

Hi

I wish to create a rule that allow a packet to a specified IP on a specified port.

The rule:

iptables -A FORWARD -s 0.0.0.0/0 -d 213.21.136.8/255.255.255.255 -dport 80 -j ACCEPT

shows me the following error:

iptables v1.2.5: multiple -d flags not allowed
Try `iptables -h' or 'iptables --help' for more information.

How I can solve my problem?

Thank you very much
Bye
Mattia