How to Block IP using iptables ?

Hello all..
Now we will give to you one tutorial about iptables.
iptables = simple firewall linux. So we can use this iptables to Block IP from this.



if your server gonna be DDOS you can use this to block the IP.
this is just simple command and so shortly :P
so i think you can do this and remember the command ..

oke let`s go :

To Block incoming conection from IP you can use this :

[#] Block One IP

~ iptables -I INPUT -s xx.xx.xx.xx -j DROP

[#] Block Range IP

~ iptables -I INPUT -s xx.xx.xx.0/24 -j DROP

if you want to delete the rules just repleace  ' -I ' with ' -D ' .
so we know :

~ iptables -D INPUT -s xx.xx.xx.xx -j DROP
~ iptables -D INPUT -s xx.xx.xx.0/24 -j DROP

Note:
Dont forget to Save the Rules with this :

~ service iptables save

thankz.
./logout
Title : How to Block IP using iptables ?
Description : Hello all.. Now we will give to you one tutorial about iptables. iptables = simple firewall linux. So we can use this iptables to Block IP...

0 Response to "How to Block IP using iptables ?"

Post a Comment