Supported Geo-Location Rule Formats

Posted on October 29, 2023

As of version 1.2.0, IP Location Block supports advanced rule formats when used with the Native Geo-Location Provider (IP Location Block).

This means that you can easily block unwanted visitors on state, city or asn level besides country level.

Requirements

To utilize this feature, first you need to enable “IP Location Block” provider using API Key, if you don’t have one, please Register your account.

Supported blocking rules

The following examples will get you an idea of the rules you want to enfore city/state level blocking.

Please keep in mind that the blocking accuracy depends on the data provided by ISPs.

1. City rule

This will match all the visitors that coming from Orlando, Florida.

US:City:Orlando

2. State rule

This will match all the visitors that coming from state of Florida.

US:State:Florida

3. Standard rule

This will match all the visitors that coming from the United States (country).

US

3. ISP/ASN Rule

To block by ASN, find the number of the ISP by checking the IP in the form below, the ASN numbers starts with “AS”, something like “ASXXXX”.

AS3549

Geolocation Test

In the following form you can obtain a test of IP Location Block response that you can use to compose your City/State rules

Multiple Rules

It’s possible to specify multiple rules in comma-separated format.

Country Codes

The most accurate list of the allowed country codes can be found here.