How to set up an iptable rule?

Vinicius cviniciusm at terra.com.br
Mon Jan 10 17:22:50 UTC 2005


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).




More information about the users mailing list