How to Block an IP Range with IPTables

Posted on Leave a commentPosted in Information Security

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 […]