🖥️ Server Information - Piramide Studio Media Portal - Windows/Linux - HTU66 🖥 🇸🇮 🇪🇺 🎼
Client Information
IP Address: 216.73.216.142
X-Forwarded-For: Not set
User Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +c...
Server Information
Software: Apache
Access from: 216.73.216.142
Server Time: 2025-12-30 03:00:47
GeoIPLegacy Updated: 2025
🔧 Apache mod_geoip Test Apache Module
| Variable | Description | Value | Status |
|---|---|---|---|
GEOIP_COUNTRY_CODE | Country Code | US | ✓ Working |
GEOIP_COUNTRY_NAME | Country Name | United States | ✓ Working |
GEOIP_CITY | City | ✓ Working | |
GEOIP_REGION | Region Code | ✓ Working | |
GEOIP_REGION_NAME | Region Name | ✓ Working | |
GEOIP_POSTAL_CODE | Postal Code | ✓ Working | |
GEOIP_LATITUDE | Latitude | ✓ Working | |
GEOIP_LONGITUDE | Longitude | ✓ Working | |
GEOIP_TIMEZONE | Timezone | ✓ Working | |
GEOIP_ASNUM | AS Number | ✓ Working | |
GEOIP_ORG | Organization | ✓ Working |
🐘 PHP MaxMind DB Reader Test MaxMind DB
Database: GeoLite2-City
Google DNS (US)
IP: 8.8.8.8
Country: United States
City: Unknown
Location: 37.751, -97.822
Cloudflare DNS (US)
IP: 1.1.1.1
Country: Unknown
City: Unknown
Location: ?, ?
Example Russian IP
IP: 217.69.139.200
Country: Russia
City: Unknown
Location: 55.7386, 37.6068
Example Chinese IP
IP: 110.242.68.66
Country: China
City: Unknown
Location: 34.7732, 113.722
PSMedia Portal IP
IP: 89.142.197.202
Country: Slovenia
City: Ljubljana
Location: 46.0503, 14.5046
Your Current IP
IP: 216.73.216.142
Country: United States
City: Columbus
Location: 39.9625, -83.0061
Database: GeoLite2-Country
Google DNS (US)
IP: 8.8.8.8
Country: United States
Cloudflare DNS (US)
IP: 1.1.1.1
Country: Unknown
Example Russian IP
IP: 217.69.139.200
Country: Russia
Example Chinese IP
IP: 110.242.68.66
Country: China
PSMedia Portal IP
IP: 89.142.197.202
Country: Slovenia
Your Current IP
IP: 216.73.216.142
Country: United States
Database: GeoLite2-ASN
Google DNS (US)
IP: 8.8.8.8
ASN: 15169
Org: Google LLC
Cloudflare DNS (US)
IP: 1.1.1.1
ASN: 13335
Org: Cloudflare, Inc.
Example Russian IP
IP: 217.69.139.200
ASN: 47764
Org: Mail.Ru LLC
Example Chinese IP
IP: 110.242.68.66
ASN: 4837
Org: CHINA UNICOM China169 Backbone
PSMedia Portal IP
IP: 89.142.197.202
ASN: 5603
Org: Telekom Slovenije, d.d.
Your Current IP
IP: 216.73.216.142
ASN: 7029
Org: Windstream Communications LLC
🔍 System Configuration Check
| Check | Status | Details |
|---|---|---|
| Apache mod_geoip | ⚠ UNKNOWN | Cannot determine status |
| PHP maxminddb extension | ✓ PASS | Configured correctly |
| Composer Autoload | ✓ PASS | Configured correctly |
| GeoIP Database Directory | ✓ PASS | Configured correctly |
| GeoLite2-City Database | ✓ PASS | Configured correctly |
| GeoLite2-Country Database | ✓ PASS | Configured correctly |
| GeoLite2-ASN Database | ✓ PASS | Configured correctly |
| Write Permissions | ✓ PASS | Configured correctly |
💡 Usage Examples + Custom Config GeoIPLegacy Full
Download here
Apache .htaccess Example:
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
GeoIPDBFile /usr/share/GeoIP/GeoIPCity.dat
</IfModule>
# Redirect based on country
RewriteEngine On
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$
RewriteRule ^(.*)$ https://chinese-site.com [R,L]
# Block specific countries
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(RU|KP|IR)$
RewriteRule ^(.*)$ /blocked.html [R,L]
# GeoIP LEGACI FULL
<IfModule mod_geoip.c>
# For performance reasons, it's not recommended to turn GeoIP on serverwide,
# but rather only in
# needed.
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat MemoryCache
GeoIPDBFile /usr/share/GeoIP/GeoIPv6.dat IndexCache
GeoIPDBFile /usr/share/GeoIP/GeoIPCity.dat Standard
GeoIPDBFile /usr/share/GeoIP/GeoIPCityv6.dat IndexCache
GeoIPDBFile /usr/share/GeoIP/GeoIPASNum.dat Standard
GeoIPDBFile /usr/share/GeoIP/GeoIPASNumv6.dat IndexCache
# MemoryCache or Standard & CheckCache & IndexCache
# Legacy Database ISP and ORG
GeoIPDBFile /usr/share/GeoIP/GeoIPISP.dat IndexCache
GeoIPDBFile /usr/share/GeoIP/GeoIPOrg.dat IndexCache
# Setup GeoIP Activation databases
GeoIPEnableUTF8 On
# GeoIPOutput Env
GeoIPOutput All
GeoIPScanProxyHeaders On
GeoIPUseLastXForwardedForIP On
GeoIPUseFirstNonPrivateXForwardedForIP On
# Country
SetEnvIf GEOIP_COUNTRY_CODE ^(.*)$ GEOIP_COUNTRY_CODE=$1
SetEnvIf GEOIP_COUNTRY_NAME ^(.*)$ GEOIP_COUNTRY_NAME=$1
# Continent
SetEnvIf GEOIP_CONTINENT_CODE ^(.*)$ GEOIP_CONTINENT_CODE=$1
# City
SetEnvIf GEOIP_CITY ^(.*)$ GEOIP_CITY=$1
SetEnvIf GEOIP_REGION ^(.*)$ GEOIP_REGION=$1
SetEnvIf GEOIP_REGION_NAME ^(.*)$ GEOIP_REGION_NAME=$1
SetEnvIf GEOIP_POSTAL_CODE ^(.*)$ GEOIP_POSTAL_CODE=$1
SetEnvIf GEOIP_LATITUDE ^(.*)$ GEOIP_LATITUDE=$1
SetEnvIf GEOIP_LONGITUDE ^(.*)$ GEOIP_LONGITUDE=$1
SetEnvIf GEOIP_DMA_CODE ^(.*)$ GEOIP_DMA_CODE=$1
SetEnvIf GEOIP_METRO_CODE ^(.*)$ GEOIP_METRO_CODE=$1
SetEnvIf GEOIP_AREA_CODE ^(.*)$ GEOIP_AREA_CODE=$1
SetEnvIf GEOIP_TIME_ZONE ^(.*)$ GEOIP_TIME_ZONE=$1
# Organization / ISP / ASN
SetEnvIf GEOIP_ORGANIZATION ^(.*)$ GEOIP_ORGANIZATION=$1
SetEnvIf GEOIP_ISP ^(.*)$ GEOIP_ISP=$1
SetEnvIf GEOIP_ASNUM ^(.*)$ GEOIP_ASNUM=$1
SetEnvIf GEOIP_ASORG ^(.*)$ GEOIP_ASORG=$1
# IP Address (captured by mod_geoip)
SetEnvIf GEOIP_ADDR ^(.*)$ GEOIP_ADDR=$1
# Setup Extra
SetEnvIf GEOIP_CITY_COUNTRY_CODE ^(.*)$ GEOIP_CITY_COUNTRY_CODE=$1
SetEnvIf GEOIP_CITY_COUNTRY_NAME ^(.*)$ GEOIP_CITY_COUNTRY_NAME=$1
SetEnvIf GEOIP_TIMEZONE ^(.*)$ GEOIP_TIMEZONE=$1
SetEnvIf GEOIP_ORG ^(.*)$ GEOIP_ORG=$1
SetEnvIf REDIRECT_GEOIP_COUNTRY_CODE ^(.*)$ REDIRECT_GEOIP_COUNTRY_CODE=$1
SetEnvIf REDIRECT_GEOIP_COUNTRY_NAME ^(.*)$ REDIRECT_GEOIP_COUNTRY_NAME=$1
########################################################################
# Example usage (optional)
########################################################################
# Header always set X-GeoIP-Country-Code "%{GEOIP_COUNTRY_CODE}e"
# Header always set X-GeoIP-City "%{GEOIP_CITY}e"
# Header always set X-GeoIP-IP "%{GEOIP_ADDR}e"
</IfModule>
########################################################################
# Example usage if you installed maxminddb Apache Module ########################################################################
<IfModule mod_maxminddb.c>
MaxMindDBEnable On
#MaxMindDBFile COUNTRY_DB /usr/local/share/GeoIP/GeoLite2-Country.mmdb
#MaxMindDBFile CITY_DB /usr/local/share/GeoIP/GeoLite2-City.mmdb
MaxMindDBFile COUNTRY_DB /usr/share/GeoIP/GeoLite2-Country.mmdb
MaxMindDBFile CITY_DB /usr/share/GeoIP/GeoLite2-City.mmdb
MaxMindDBEnv COUNTRY_CODE COUNTRY_DB/country/iso_code
MaxMindDBEnv REGION_CODE CITY_DB/subdivisions/0/iso_code
MaxMindDBNetworkEnv COUNTRY_DB COUNTRY_NETWORK
MaxMindDBNetworkEnv CITY_DB CITY_NETWORK
#MaxMindDBSetNotes On
</IfModule>
#<IfModule mod_maxminddb.c>
# MaxMindDBEnable On
# #MaxMindDBFile ASN_DB /usr/local/share/GeoIP/GeoLite2-ASN.mmdb
# MaxMindDBFile ASN_DB /usr/share/GeoIP/GeoLite2-ASN.mmdb
#
# MaxMindDBEnv MM_ASN ASN_DB/autonomous_system_number
# MaxMindDBEnv MM_ASORG ASN_DB/autonomous_system_organization
#
# MaxMindDBNetworkEnv ASN_DB ASN_DB_NETWORK
# #
#<IfModule mod_maxminddb.c>
# MaxMindDBEnable On
# ##MaxMindDBFile CITY_DB /usr/local/share/GeoIP/GeoLite2-City.mmdb
# MaxMindDBFile CITY_DB /usr/share/GeoIP/GeoLite2-City.mmdb
# MaxMindDBEnv MM_COUNTRY_CODE CITY_DB/country/iso_code
# MaxMindDBEnv MM_COUNTRY_NAME CITY_DB/country/names/en
# MaxMindDBEnv MM_CITY_NAME CITY_DB/city/names/en
# MaxMindDBEnv MM_LONGITUDE CITY_DB/location/longitude
# MaxMindDBEnv MM_LATITUDE CITY_DB/location/latitude
#
# MaxMindDBNetworkEnv CITY_DB CITY_DB_NETWORK
#</IfModule>
### Allow countries
#<Location />
#SetEnvIf GEOIP_COUNTRY_CODE SI AllowCountry
#Deny from all
#Allow from env=AllowCountry
#</Location>
### Block countries
#<Location />
# SetEnvIf GEOIP_COUNTRY_CODE IL BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE EE BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE PL BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE ZA BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE VN BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE FM BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE CF BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE AP BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE AF BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE KP BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE KR BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE IN BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE HK BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE ID BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE TW BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE TH BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE SG BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE AL BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE GQ BlockCountry
# SetEnvIf GEOIP_COUNTRY_CODE IR BlockCountry
# Block Anonimous Proxy Servers
# SetEnvIf GEOIP_COUNTRY_CODE A1 BlockCountry
# Block Asia Pacific Region
# SetEnvIf GEOIP_COUNTRY_CODE AP BlockCountry
# Block Armed Forces America All
# SetEnvIf GEOIP_COUNTRY_CODE AA BlockCountry
# Block Armed Forces Europe All
# SetEnvIf GEOIP_COUNTRY_CODE AE BlockCountry
# Block Armed Forces Pacific All
#SetEnvIf GEOIP_COUNTRY_CODE AP BlockCountry
# Block All Oceania islands and regions UK Australian Pacific
# SetEnvIf GEOIP_COUNTRY_CODE OC BlockCountry
# Block All Statelite internet provider anonymous and public "Satellite Provider"
# SetEnvIf GEOIP_COUNTRY_CODE A2 BlockCountry
# Block All "Other Country" Anonimous and other country hiden
# SetEnvIf GEOIP_COUNTRY_CODE O1 BlockCountry
# Deny from env=BlockCountry
#</Location>
PHP Usage Example:
// Method 1: Using Apache environment variables
$country = $_SERVER['GEOIP_COUNTRY_CODE'] ?? 'Unknown';
$city = $_SERVER['GEOIP_CITY'] ?? 'Unknown';
// Method 2: Using MaxMind DB Reader
$reader = new MaxMind\Db\Reader('/usr/share/GeoIP/GeoLite2-City.mmdb');
$data = $reader->get($_SERVER['REMOTE_ADDR']);
if ($data) {
$country = $data['country']['names']['en'] ?? 'Unknown';
$city = $data['city']['names']['en'] ?? 'Unknown';
$lat = $data['location']['latitude'] ?? null;
$lon = $data['location']['longitude'] ?? null;
}
$reader->close();
?>
GeoIPLegacy:
💡 Download GeoIPLegacy Full
Download here
UNPAK ALL ZIPPED DATABASE IN MAP /usr/share/GeoIP/ or IN ANY OTHER MAP YOU USE FOR GEOIP BASE MAP.
Terminal command:
cd LOCATION OF YOUR GEOIP DATABASE MUST BE SUDO SU
cd /usr/share/GeoIP/
wget https://pcsnet.mywire.org/ddl/files/GEOIPLEGACY.ZIP
unzip GEOIPLEGACY.ZIP
INSTALL AFTER YOU HAVE ALL DATABASES PLUGINS FOR GEOIP PYTHON, PERL, PHP,....
GEOIPLEGACY.ZIP IS UPDATED/CONVERTED FROM MAXMINDDB TO GEOIPLegacy ICH MONTH