-   Linux - Networking (
-   -   --destination-ports port[,port[,port...]] (

KevinGuy 03-16-2004 12:46 PM

--destination-ports port[,port[,port...]]
Why is it that I get this:

iptables v1.2.7a: Unknown arg `--destination-ports'
Try `iptables -h' or 'iptables --help' for more information.

when I have this code:

$IPT -I TRAFFIC -p tcp --destination-ports 5631,5633,5635 -s -j ACCEPT
It wont let me use multiple ports.... i have to use either --dport, or --destination-port. But this only alows me to use one single port.


chort 03-16-2004 07:06 PM

Well according to the iptables man page it says the multiport module will allow you to use --destination-port port[,port], etc. So it looks like it shouldn't be plural (port, not ports) and you also need the multiport module for netfilter.

You could also write it in a for loop, if you wanted

for port in 5631 5633 5635 ; do $IPT -I TRAFFIC -p tcp --dport $port -s -j ACCEPT ; done ; unset port

All times are GMT -5. The time now is 08:53 PM.