Recognize AnyCast Address in Geo-IP Blocking
An AnyCast IP can be advertised from multiple locations and the router selects a path based on latency, distance, cost, number of hops, etc. This technique is widely used by providers to route users to the closest server. Since the IP is hosted in multiple geographic locations, there is no way to specify one single location to that IP.
This version introduces an option to bypass AnyCast IP ranges in Geo-IP blocking. ISDB contains a list of confirmed AnyCast IP ranges that can be used for this purpose.
When source/destination is set to
geoip, you can enable the
geoip-anycast option. When enabled, IPs where the AnyCast option is set to
geoip_db are bypassed in country matching and blocking.
You can only use CLI to configure this feature. See the following example.
geoip-anycast setting in a policy:
config firewall policy
set name "policyid-1"
set uuid dfcaec9c-e925-51e8-cf3e-fed9a1d42a1c
set srcintf "wan2"
set dstintf "wan1"
set srcaddr "all"
set dstaddr "test-geoip-CA_1"
set action accept
set schedule "always"
set service "ALL"
set geoip-anycast enable
set logtraffic all
set nat enable
To check the
geoip-anycast option for an IP address:
diag geoip ip2country 126.96.36.199
188.8.131.52 - Australia, is anycast ip
184.108.40.206 is the AnyCast IP.