Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 16460fdc24
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (24 sloc) 1.375 kb

A fork of MaxMind's mod_geoip2 with more intelligent X-Forwarded-For handling, as per this post.

Currently based on mod_geoip2_1.2.7

Summary: The client-IP address in the list of addresses potentially in the X-Forwarded-For HTTP header is normally the left-most header but clients with private IP addresses using a forwarding proxy mean that you'll often get the wrong address, usually a private IP address. This module follows the rule:

Always use the leftmost non-private address.

You can compare with the current MaxMind release here.

Note: There is a GeoIPEnableHostnameLookups flag, don't use it, it can lead to lengthy blocking lookups, I'll be removing it at some point unless someone wants to contribute a lookup that can timeout after a very short period.

Contributions more than welcome! I haven't done any serious C for a long time so it's not a natural language for me any more and this module isn't a high priority for me.

Original MaxMind README is here.

Follow the same instructions found in the original INSTALL.

Something went wrong with that request. Please try again.