I need a port between 700 and 800 to be able to access TCP
The code is as follows |
Copy Code |
-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 dad, will there be a better solution, we look at the following
The code is as follows |
Copy Code |
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 700:800-j ACCEPT |
This is done, a sentence on it, the following more to say a few iptables firewall some rules.
One, 700:800 means all ports between 700 and 800
Two: 800 means 800 and all of the following ports
Three, 700:700 and above all ports
We can take a look at the example
The code is as follows |
Copy Code |
One, a rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 7979:9898-j ACCEPT |
Access 9898 Normal