The Apache Haus Forum

Forum Topics => News & General Discussion => Topic started by: Gregg on December 22, 2010, 02:33:01 AM

Title: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Gregg on December 22, 2010, 02:33:01 AM
Get them on our download page (http://www.apachehaus.com/cgi-bin/download.plx).
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: mario on December 22, 2010, 02:05:13 PM
nice work!
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Sob on December 22, 2010, 08:37:29 PM
It seems there's something wrong with your mod_geoip. It kills Apache child process ("Parent: child process exited with status 255 -- Restarting.") in x64 version, while x86 version just ignores IPv6 addresses and looks only in GeoIP.dat (checked by Process Monitor). Version compiled by myself works correctly (only x64 tested, I had some problem linking to x86 AH release and was lazy to compile the whole thing).

Any idea what might be different?

How to test it even without IPv6:

- set GeoIPScanProxyHeaders On
- put simple test script on server:
<?php
  
foreach($_SERVER as $key=>$val) {
    if(
substr($key03)=='GEO') echo $key.' = '.$val.'<br>';
  }
?>

- run "telnet <your server ip> <port>" and type:
GET /path/to/testscript.php HTTP/1.0
Host: www.yourserver.tld
X-Forwarded-For: 2a00:1450:8007::67


You can fake any IP in X-Forwarded-For. The above one belongs to Google and GeoIP should report Ireland as country.
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Gregg on December 22, 2010, 09:23:07 PM
Yep, I missed a patch darnit. Will do over tonight.
Till then I've removed announcement on front page & binaries from download page.
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Gregg on December 22, 2010, 10:08:49 PM
Quote from: Sob on December 22, 2010, 08:37:29 PMI had some problem linking to x86 AH release

Care to elaborate?
Missing symbols?
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Gregg on December 23, 2010, 02:48:44 AM
I get bad headers when I try to test this via telnet ... so, here's an x86 one. Please try it, if it works I'll move the same source to the x64 box & build x64.

http://www.apachehaus.net/modules/mod_geoip-ipv6.zip
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Sob on December 23, 2010, 03:40:17 PM
Quotemod_geoip.obj: error LNK2019: unresolved external symbol _ap_add_common_vars referenced in function _geoip_header_parser

But it's not exactly true, the symbol exists in libhttpd.lib, except it's named "_ap_add_common_vars@4". Seems like some different naming convention or something, don't know where it comes from.

Tried your new x86 module and at the first sight it works fine.
Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Gregg on December 23, 2010, 08:35:13 PM
Thanks for testing it. I'll do the x64 now, repackage and release.

Ah yes, ap_add_common_vars() requires util_script.h to be included in mod_geoip.c and on line ~301 removing the unused

GeoIP *gip;

makes it compile without warnings.

Title: Re: Apache 2.3.10-alpha, mod_security 2.5.13 & mod_geoip +IPv6 Released
Post by: Gregg on December 23, 2010, 10:26:27 PM
Done and -r2 zips are up. Thanks!