A gadget that displays IP geolocation information under Linux-nali

Source: Internet
Author: User
Tags nslookup

A gadget that displays IP geolocation information under Linux-nali

First, Introduction

Nali, the name is taken from the Chinese "where" pinyin. Nali contains a set of command-line programs whose main function is to attach the IP strings of the output of some network tools to the location information (using the Pure database QQWry.Dat). For example, 74.125.128.104 will become 74.125.128.104[the California Mountain View of the United States Google Inc.]. Queries are made locally and do not make networked queries, so efficiency does not affect the original command.

The following commands are currently included:

    • Nali

    • Nali-dig

    • Nali-nslookup

    • Nali-traceroute

    • Nali-tracepath

    • Nali-ping

The premise of using these commands is that their corresponding command must exist. For example, if you want to use Nali-dig, you must ensure that dig is present. Their usage is the same as the original command. For example Nali-dig, usage is the same as dig. (Nali-dig equivalent to dig |nali)

Second, download

# wget--no-check-certificate http://qqwry.googlecode.com/files/nali-0.2.tar.gz

Third, installation

# tar ZXVF nali-0.2.tar.gz

# CD nali-0.2

#./configure

# Make && make install

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "title=" Nali-2 "src=" http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241629587124.jpg "alt=" Nali-2 " height= "317" border= "0" width= "616"/>

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "Title=" 3 "src=" Http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630001660.jpg "alt=" 3 "height=" 340 " Border= "0" width= "372"/>

Iv. Updating IP databases

You can use the Nali-update command to update the IP database

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "Title=" 4 "src=" Http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630012399.jpg "alt=" 4 "height=" 106 " Border= "0" width= "650"/>

/usr/local/share/qqwry.dat This file needs to be updated frequently, otherwise the error will be relatively large.

V. Use of

5.1. Nali

# Nali 74.125.128.106

# Nali 61.135.169.105

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "title=" 5 "src=" Http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630023347.jpg "alt=" 5 "height=" 73 " Border= "0" width= "387"/>

5.2. Nali-dig

# Nali-dig www.google.com

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "title=" 7 "src=" Http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630041263.jpg "alt=" 7 "height=" 340 " Border= "0" width= "774"/>

5.3. Nali-nslookup

# nali-nslookup www.google.com

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "title=" 8 "src=" Http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630067444.jpg "alt=" 8 "height=" 263 " Border= "0" width= "473"/>

5.4. Nali-traceroute

# Nali-traceroute www.google.com

650) this.width=650; "Src=" http://images.cnitblog.com/blog/370046/201212/ 24163527-2698a85a49f9486dba47105045770def.jpg "height=" 157 "width=" "/>"

5.5. Nali-tracepath

# Nali-tracepath Www.baidu.com

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px ; "title=" src= "http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630099099.jpg" alt= "height=" 237 "border=" 0 "width=" 865 "/>

5.6. Nali-ping

# nali-ping Www.163.com

650) this.width=650; "Style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px;border:0px , "title=" one "src=" http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630103427.jpg "alt=" "height=" 119 "border=" 0 "width=" 731 "/>

5.7. Other program calls Nali Display IP physical location can use redirection mode, such as:

# mtr Www.google.com|nali

650) this.width=650; "Src=" http://images.cnitblog.com/blog/370046/201212/24163620- B94e3c0ae66c48edb7dac490e0780c41.jpg "width=" "/>"

In other words, Nali This command, you can attach the geo-information to the standard output IP. Similarly, if you do not like to use Nali-dig, then you can also use dig Ip|nali such commands.

VI. Alias

If you think the input nali-xxx trouble, then you can do some alias, for example:

# alias Traceroute= ' Nali-traceroute '
# alias dig= ' Nali-dig '

650) this.width=650; "style=" background-image:none;padding-left:0px;padding-right:0px;padding-top:0px; "title=" 13 "Src=" http://images.cnblogs.com/cnblogs_com/mchina/201212/201212241630127274.jpg "alt=" "height=" 423 "width=" "/>

Vii. Reference

Https://www.surfchen.org/nali


A gadget that displays IP geolocation information under Linux-nali

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.