Technology related solutions, tips, tricks, and other interesting topics
If you want to block a range of IP addresses from accessing your CentOS server you can issue the following IPTables firewall command:
/sbin/iptables -I INPUT -m iprange --src-range 192.168.1.1-192.168.1.2.100 -j DROP
Replace “192.168.1.1-192.168.1.2.100″ with the IP range you want to block. This command only works with the IPTables firewall so if your operating system is using a different firewall then this command will not work.
Here is another example which uses CIDR notation to specify the IP range:
/sbin/iptables -I INPUT -s 192.168.1.1/25 -j DROP
If you restart your server, the drop command will be removed. If you want this command to persist through reboots, then you’ll need to add it to a startup script.

This blog is about technology related topics. It will primarily contain problems and solutions to IT problems that I encounter on a day-to-day basis. In addition interesting things I come across either on or off the internet will be posted here as well. I will also include step-by-step tutorials to common tasks people may need to do with their computers.