Specifying a port range with iptables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Doug,
You have a syntax problem I think.
The beginning of your iptables command should look like:
iptables -t nat -A PREROUTING  and so on.
Also, don't forget to use a ':' in your port range rather than a '-' like 
somebody already said
     Jim Wantz
.

On Thu, 11 Apr 
2002, Doug Lawlor 
wrote:

> Is it possible to specify a port range using iptables?  If I present
> iptables with the following line it gives me a statement something like:
> 
> iptables -A PREROUTING -t nat -p udp -d $MYIP --dport 2074 - 2076 -j DNAT --to 192.168.0.2:2074 - 2076
> 
> "Bad argument `-'
> Try `iptables -h' or 'iptables --help' for more information.  "
> 
> If I take out the spaces between the dashes:
> 
> iptables -A PREROUTING -t nat -p udp -d $MYIP --dport 2074-2076 -j DNAT --to 192.168.0.2:2074-2076
> 
> I get an invalid port specification or something to that effect.  
> 
> Any help on this would be appreciated.  
> 
> Doug
> 
> 





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux