Re: How to set up an iptable rule?

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

 



Vinicius escreveu:
Vinicius escreveu:

Hello,

I would like to have a rule to reject an out-of-range IP's to access a specified port on my system, so I did the following rule:
"iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -m iprange ! --src-range 200.252.X.X-200.252.X.Y -j REJECT --reject-with icmp-host-prohibited", where X and Y are appropiate numbers.


Does the above rule correct, please?

TIA,
Vinicius.


If the above rule number is 4 and the following rule number is 3, then is the rulenum 4 useless, please?
rule number 3: "iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT"


TIA,
Vinicius.


Supposing rule number 3 was appended before rule number 4 (why I did mentioned the numbers).



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux