Score:0

Allow IP NAT for Mod GeoIP on Apache

vn flag

I have web server is running Apache 2.4.46 under Centos 7 server.

Currently, I have configured mode GeoIP for it, used MaxMind GeoLite2 Database and only allow access from specific countries.

It's running OK but today, a few customers cannot access my website and got 403 Error (Permission Denied).

I checked on web server and saw that: These customers is living at my allowed countries but their public IP address when access to my web server is IP NAT and these IP will be denied by my GeoIP ACL.

So, my question is: how can I allow these IP NAT to access my website under GeoIP mode installed on web server? I have to ask their ISP for IP NAT pool and allow it one-by-one on GeoIP ACL or are there any best ways to allow it? Thank you so much for your help

Here is my GeoIP ACL:

MaxMindDBFile COUNTRY_DB /usr/local/GeoIP/GeoLite2-Country.mmdb
MaxMindDBEnv MM_COUNTRY_CODE COUNTRY_DB/country/iso_code

SetEnvIf MM_COUNTRY_CODE SG AllowCountry
SetEnvIf MM_COUNTRY_CODE KH AllowCountry
SetEnvIf MM_COUNTRY_CODE O1 AllowCountry
SetEnvIf MM_COUNTRY_CODE A1 AllowCountry
SetEnvIf MM_COUNTRY_CODE A2 AllowCountry

Deny from all
Allow from env=AllowCountry
Allow from 10.0.0.0/8
Allow from 172.16.0.0/12
Allow from 192.168.0.0/16
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.