Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-16-2004, 11:46 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 29

Rep: Reputation: 15
--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.

Old 03-16-2004, 06:06 PM   #2
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PLESK [Solution] Change port to 23 (telnet) instead of default port 8443 x5452 Linux - Software 6 05-10-2009 05:58 AM
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
change port using destination alaios Linux - Networking 3 03-01-2005 04:06 AM
IPTABLES --to-destination muliple ip:port hawk4eye Linux - Networking 4 02-07-2003 04:59 AM > Forums > Linux Forums > Linux - Networking

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration