Using GeoIP to look up physical locations of the IP address

Wireshark 1.1.2 and the higher versions can use GeoIP (commercial version) and GeoLite (free version) databases to look up the city, country, AS number, and other information for an IP address discovered by Wireshark.

Getting ready

  1. Go to the following website: http://dev.maxmind.com/geoip/geolite.
  2. For IPv4, download the following files (the binaries):
    • GeoLite Country
    • GeoLite City
    • GeoLite ASN
  3. For IPv6, download the following files:
    • GeoLite Country (IPv6)
    • GeoLite City (IPv6)
    • GeoLite ASN (IPv6)

      Tip

      Autonomous System (AS) is a term used in Exterior Gateway Protocols (EGPs), for identifying all routers under the control of the same network operator. When you connect to the Internet through two different Internet Service Providers (ISPs), you will get your own AS, while the two ISPs have their ASe While configuring connectivity to the Internet with two different Internet Service Providers (ISPs), ASs are configured along with an EGP routing protocol. The market standard for EGP protocol is Border Gateway Protocol version 4 (BGPv4).

    You will get the binary files with the country, city, and Autonomous System (AS) numbers.

How to do it...

After you have downloaded the files, follow these steps:

  1. Put all of the files in the same directory (you can also put them in different directories, but it will be less convenient).
  2. Now, you must tell Wireshark where the files are. Go to Edit | Preferences | Name Resolution and select GeoIP database directories.
  3. Add the full path of the GeoIP directory, as shown in the following screenshot:
    How to do it...
  4. Click on Apply and close the window and restart Wireshark.
  5. Now, start Wireshark (or open saved file), select Statistics | Endpoints, and see the GeoIP information in any of the tabs that contains the IP addresses:
    How to do it...
  6. You can also see the GeoIP data in the IP packet detail tree. To enable this, go to Edit | Preferences | Protocols | IP and make sure that Enable GeoIP lookup is checked.
    How to do it...

How it works...

The IP addresses are provided by Internet Assigned Numbers Authority (IANA), a suborganization of the Internet Standard Organization (ISO), to regional organizations called Regional Internet Registrars (RIPE-NCC, APNIC, AFRINIC, LACNIC, and ARIN), who then allocate them to national ISPs, and national ISPs allocate them to individual customers. GeoIP simply is a database of these locations, so it resolves the IP addresses that Wireshark captures according to this database.

The GeoLite files are free IP geographical location databases that are updated monthly. It can be found at http://dev.maxmind.com/geoip/geolite#IP_Geolocation-1.

There's more...

The GeoIP can be used for several reasons:

  • To view the sites (websites, FTP servers, and so on), that people in your organization are connecting to
  • To resolve source IP addresses of connections that are coming from the world to your organization
  • For fun
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.95.150