LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

Rep: Reputation: 15
--destination-ports port[,port[,port...]]


Why is it that I get this:
Code:
iptables v1.2.7a: Unknown arg `--destination-ports'
Try `iptables -h' or 'iptables --help' for more information.
DONE.
when I have this code:
Code:
$IPT -I TRAFFIC -p tcp --destination-ports 5631,5633,5635 -s 0.0.0.0 -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.

Thanks
 
Old 03-16-2004, 06:06 PM   #2
chort
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: 69
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 0.0.0.0 -j ACCEPT ; done ; unset port
 
  


Reply


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


All times are GMT -5. The time now is 01:34 PM.

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