I need a port between 700 and 800 to have TCP access
Code to copy code as follows
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 700-j ACCEPT
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 701-j ACCEPT
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 702-j ACCEPT
...
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 800-j ACCEPT
This is very pit Father Ah, (Www.111cn.net) will have a better solution, below we look
Code to copy code as follows
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 700:800-j ACCEPT
This will be done, a sentence on it, the following a few more words iptables firewall some rules.
One, 700:800 represents all ports between 700 and 800
Ii.: 800 means all ports 800 and below
Three, 700: Indicates 700 and above all ports
We can take a look at the examples
Code to copy code as follows
One,-a rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 7979:9898-j ACCEPT
Access 9898 Normal
From:http://www.111cn.net/sys/linux/45525.htm
iptables firewall specified port range in Linux