Multiple -d flags
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
Quoted 9 lines
The rule:
iptables -A FORWARD -s 0.0.0.0/0 -d
213.21.136.8/255.255.255.255 -dport
80 -j ACCEPTshows me the following error:
iptables v1.2.5: multiple -d flags not allowed
You should use '--dport' instead of '-dport'.
Quoted 5 lines
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.
You have to specify a protocol with the -p option, then you can use --dport! Try this one:
iptables -A FORWARD -s 0.0.0.0/0 -d 213.21.136.8/255.255.255.255 -p tcp --dport 80 -j ACCPET