Usage: ip2loc [-i] [-c] IP ... Shows countries or country codes for IP addresses. Options: -i show IP -c show country as code instead as name -C do not show country -r show IP range -m show all matching ranges -n do not show trailing \n -L <code> show country code <code> -R <code> show IP ranges for country <code> -G <file> use <file> as geolocation file instead of /usr/share/ip-geo.ids When IP is '-', the addresses are read from stdin.
When the IPs are read from stdin, the rest of the line after the IP address is ignored, making this tool suitable for processing scripts.
Examples:
ip2loc 1.2.3.4 |
Determine country of 1.2.3.4 |
ip2loc -r -C 1.2.3.4 |
Show only IP range 1.2.3.4 belongs to |
ip2loc -c 1.2.3.4 2.3.4.5 |
Determine country of 1.2.3.4 and 2.3.4.5, show as code |
ip2loc -m -r 1.2.3.4 |
Show ranges for all matching entries, not only the closest match |
ip2loc -L CZ |
Show the country with code CZ |
ip2loc -R CZ |
List all the known IP ranges of CZ |
You came from , which is
Usage: /bin/shad/ip2loc
Part of the project is a very simple utility for transcoding network IP ranges between the IP/mask and IP..IP notations.
Examples:
ipdiffmask 192.168.1.0/8 |
Shows 192.168.1.0-192.168.1.255 |
ipdiffmask 192.168.32.0-192.168.36.255 |
Shows 192.168.32.0/21 |
Add databases from http://www.maxmind.com/download/geoip/database/