« Back to profile of belsemtech

  • Bash/shell

    Blocking IPS of any country

    this bash Script For Blocking IPS of any country RomioNet

    13:05 Jul 10 2010 | Tags : Blocking,IPS,country,
    						echo "Blocking IPS of any country"
echo ""
echo "To know code of countries which you want to block"
echo "you can enter ( http://www.blogama.org/country.txt )"
echo ""
sleep 3
echo "Below you can type code of country Ex. ( IL ) for Israel "
echo -n " Enter Code : "
read code
wget -c --output-document=ips4countries.txt http://blogama.org/country_query.php?country=$code
for i in `cat /root/ips4countries.txt`
do
iptables -I INPUT -s ${i} -j DROP
done  ;
echo "Best Regards"
exit 
    			         
Owned Code : RomioNet
Add comment
To add a comment, please : Login or Sign up
    belsemtech
    oussama larhmich
  • New visitor?

    On setCode, you can save your codes, functions and classes, you can also share them with your friends, and track your favorite developer

    Join the SetCode community
  • Your language here :