How To Use GeoIP With Wireshark

MaxMind produces databases and software for geolocation. Wireshark 1.1.2 and later can use MaxMind's GeoIP (purchase) and GeoLite (free) databases to look up the city, country, AS number, and other information for an IP address. The for-purchase GeoIP City and GeoIP Country databases are more accurate than the free GeoLite City and GeoLite Country databases; free versions of the GeoIP Region, GeoIP Organization, and GeoIP ISP databases are not available. The GeoLite version of the AS number database is the only version of that database; there is no for-purchase GeoIP version.

Getting Started

To see if your copy of Wireshark supports GeoIP and GeoLite, go to Help→About Wireshark and look for GeoIP in the "Compiled with" paragraph.

geoip-about.png

Wireshark does not ship with any GeoIP or GeoLite databases, so you have to download them yourself. You can get them at the following locations:

Download the databases in binary format, rather than CSV format.

It's more convenient if you put all of the databases in the same directory. Once you've downloaded your databases, you must tell Wireshark where they are. Go to Edit→Preferences→Name Resolution and select GeoIP database directories. Add the full path of each database directory, as shown below:

geoip-settings.png

Now, restart Wireshark. At this point you should be able to load a capture file, select Statistics→Endpoints, and see GeoIP information in any tab that contains IP addresses (IP, TCP, UDP, etc).

You can optionally see GeoIP data in the IP packet detail tree. To enable this, go to Edit→Preferences→Protocols→IP and make sure Enable GeoIP lookups is checked.

Filtering Traffic

You can use the ip.geoip display filters to filter traffic.

Exclude U.S.-based traffic:

 ip and not ip.geoip.country == "United States" 

Show address above the arctic circle:

 ip.geoip.lat > "66.5" 

HowToUseGeoIP (last edited 2013-08-27 18:54:38 by GuyHarris)