Troubleshooting Access Control by Country Issues
Access control by country will work if the network information of the IP address matches the countries you specify in the configuration. Use sites such as What Is My IP and ipinfo.io to confirm that the country associated with the IP address is what you expect it to be.
Allowed countries not working
The country specified in the network information for the IP address does not match the country you specified in the configuration. Use sites such as What Is My IP and ipinfo.io to confirm that the country associated with the IP address is what you expect it to be.
Check if the country you specified is also being used in the Disallowed Countries configuration and note that Disallowed Countries take precedence over Allowed Countries.
It could also be that the user may be using a VPN connection to a different country. Check which VPN networks are being used, and their associated IP addresses, and either include all those countries in the configuration or inform the user about which network connection they should avoid using.
Disallowed countries not working
It could be possible that the country specified in the network information for the IP address does not match the country you specified in the configuration. Use sites such as What Is My IP and ipinfo.io to confirm that the country associated with the IP address is what you expect it to be.
The user may be using a VPN connection to a different country. Check which VPN networks are being used, and their associated IP addresses, and include all those countries in the configuration also.
Sanctioned Countries
Connections from sanctioned countries will always be blocked.