# Awstats and GeoIP

## laman

I'm using awstats now for about two years now. 

I love it. But i was wondering why there were unresolved ip-adresses in my list.  So i was looking for a solution and I found GeoIP.

But I tried almost everything   :Shocked:  and it still does not work!!!

Does anyone has a solution for this problem.

Thanx

Robert

----------

## laman

Ok I solved it. After a lot of research I found a post with the solution for me.

Here it comes.

1. Install AWStats 

2. Download Geo-IPfree-0.2.tar.gz from the Comprehensive Perl Archive Network (CPAN). 

3. Un tar/gzip that. Out of the tar's lib directory, throw the entire "Geo" directory into your AWStats plugins directory. 

4. Uncomment the line that activates the GeoIPFree plugin in your AWStats config. I.e. take the "#" out of '#LoadPlugin="geoipfree"' 

5. Run an AWStats update. Remember you won't get instant results - only lines that you process from here on out will be located. You will, however, get errors instantly, so you should try an update right away even if you dont have anything to process. 

Thanks to the discussion forums on Sourceforge.net

I hope this works for everybody (for me it was fine   :Laughing:  )

Greetz

Robert

----------

## _GeG_

try

```
emerge awstats

emerge geoip

emerge Geo_IP
```

and add this to your awstats.*.conf file:

```
LoadPlugin="geoip GEOIP_STANDARD"
```

it "only"  :Sad:  cost me half a day to find it out. Those gentoo people have really good ideas, but they really don't check their ebuilds, and they don't document anything.

Did you know that there is a geoip USE flag? I expected that awstats would honor it. No way.

----------

## [dmnd]

 *_GeG_ wrote:*   

> try
> 
> ```
> emerge awstats
> 
> ...

 

I always use emerge -pv <ebuild> to see what use flags are checked for.

----------

## _GeG_

 *Quote:*   

> I always use emerge -pv <ebuild> to see what use flags are checked for.

 Yes, me too. But I haven't found a single ebuild that uses the geoip flag, so I wonder why it exists

----------

## Salemixu

Hi!

I tried both versions of the GeoIP installation and any of them has resolved any country  :Sad: 

It determines that there are ip's from the lan and resolves its name because is in /etc/hosts

Should i wait more than 5 minutes in order to get the country?

Any solution to it?

----------

## j-m

 *[dmnd] wrote:*   

>  *_GeG_ wrote:*   try
> 
> ```
> 
> emerge geoip
> ...

 

There is no geoip flag. 

```

emerge -pv awstats

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] net-www/awstats-6.3-r2  -vhosts 0 kB

```

And the command should be:

```

emerge Geo-IP

```

This is the package:

```

dev-perl/Geo-IP

      Latest version available: 1.21

      Latest version installed: 1.21

      Size of downloaded files: 11 kB

      Homepage:    http://www.cpan.org/modules/by-authors/id/T/TJ/TJMATHER/Geo-IP-1.21.readme

      Description: Look up country by IP Address

      License:     || ( Artistic GPL-2 )

```

No other configuration needed expect for the one line in AWStats config. And no - it won´t "resolve" private IP addresses from LAN, and I don´t really see how on earth it should do such thing.  :Confused: 

----------

## Salemixu

I think it resolves private ip's because i have that ip resolved on /etc/hosts

But the external ip's from internet are still unresolved  :Sad: 

Any way to try if the problem is of geoip or from my computer?

----------

## _GeG_

j-m: *Quote:*   

> There is no geoip flag

 Have a look at http://www.gentoo.org/dyn/use-index.xml, you will find the geoip flag  :Very Happy: 

----------

## Bob P

 *_GeG_ wrote:*   

>  *Quote:*   I always use emerge -pv <ebuild> to see what use flags are checked for. Yes, me too. But I haven't found a single ebuild that uses the geoip flag, so I wonder why it exists

 

i found one.  look here:

https://forums.gentoo.org/viewtopic-t-239587-highlight-geoip+country.html

----------

## _GeG_

yes, geoip flag use is coming  :Wink: 

webalizer-2.01.10-r8 (still masked) seems also to have geoip flag support.

----------

## phlowww

nicotine, a soulseek p2p client already supports geoip, which is nice to see where the people you're downloading are located.

----------

## BlinkEye

 *laman wrote:*   

> Ok I solved it. After a lot of research I found a post with the solution for me.
> 
> Here it comes.
> 
> 1. Install AWStats 
> ...

 

thanks. it seems to be the only plugin working for me.

----------

## ben-xo

I posted how to get Awstats + GeoIP working in this thread:

https://forums.gentoo.org/viewtopic-t-279860.html

my posts's at the end (post number 61) as of today

----------

