Coder Social home page Coder Social logo

archived-mod_geoip2_xff.old's Introduction

mod_geoip2_xff

mod_geoip2 with fancy, new-fangled X-Forwarded-For handling

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.

To enable this special mode you need to turn the GeoIPUseLeftPublicXForwardedForIP flag On in your apache config.

An additional config option is also available: GeoIPEnableHostnameLookups, when set to On mod_geoip2 will attempt to resolve the matched IP address and store the result in the GEOIP_HOST environment variable. This is useful for logging or other basic remote host based configuration.

Changes for this fork are being recorded in the Changes file.

Contributions more than welcome!

Thanks to Kevin Gaudin for his contributions to fall back to the RemoteIP where we fail to find a public IP address match.

Original MaxMind README is here.

Follow the same instructions found in the original INSTALL.

See Downloads for tarballs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.