Block Visitors by Country Using Firewall

Do you want to block visitors by country?

Select the countries you want to block, IP address version (IPv4 or IPv6), output format and press the "Download" button.

The output format supported are Apache .htaccess, iptables (CIDR), Netmask, Inverse Netmask, IIS web.config and Cisco ACL. Please find the details below:

Format Sample Output
Apache .htaccess allow allow from 8.8.8.0/24
Apache .htaccess deny deny from 8.8.8.0/24
Linux iptables (CIDR) 8.8.8.0/24
Netmask 8.8.8.0/255.255.255.0
Inverse Netmask 8.8.8.0 0.0.0.255
Web.config allow <ipSecurity allowUnlisted="false">
<add ipAddress="8.8.8.0" subnetMask="255.255.255.0"/>
Web.config deny <ipSecurity allowUnlisted="true">
<add ipAddress="8.8.8.0" subnetMask="255.255.255.0"/>
Cisco ACL deny ip 8.8.8.0 0.0.0.255 any

If you want to block visitors in IIS Web Server, please consider the commercial edition of the IP2Location HTTP Module.

 

Step 1: Choose IPv4 or IPv6

Select IP address version.

Step 2: Select the countries from the list you want to block

Unregistered user can generates table for 1 country at one time. Registered user can generates up to 30 countries at one time. Register your free account here today.

(Press CTRL + Click for multiple countries selection)

Step 3: Choose the output format

Select one output format from drop-down list.

 

Looking for a visitor blocking solution for wordpress site? Check out the below free plugins.