nslookup反向_如何在Linux和Windows中使用Nslookup引导和反向IP查找?

nslookup反向

nslookup反向

nslookup is a network tool using to query DNS to obtain a domain name or IP address? The full name of nslookup is “name server lookup”. Nslookup supports interactive and batch mode. Nslookup alternative is dig which uses underlying Operating System libraries.

nslookup是用于查询DNS以获得域名或IP地址的网络工具吗? nslookup的全名是“名称服务器查找”。 Nslookup支持交互式和批处理模式。 Nslookup替代方法是dig,它使用基础操作系统库。

nslookup命令语法 (nslookup Command Syntax)

The syntax of nslookup command is like below.

nslookup命令的语法如下。

nslookup [-option] [name | -] [server]
  • name is the domain name we want to use

    name是我们要使用的域名

  • server is the DNS server we want to use where if not specified the system provided DNS server will be used.

    server是我们要使用的DNS服务器,如果未指定,将使用系统提供的DNS服务器。

互动用法 (Interactive Usage)

Nslookup can be used in two different modes. One is an interactive mode. In order to use nslookup interactively just enter nslookup in the command line.

Nslookup可以在两种不同的模式下使用。 一种是交互模式。 为了交互使用nslookup,只需在命令行中输入nslookup。

$ nslookup
Open nslookup interactive shell
Open nslookup interactive shell
打开nslookup交互式外壳

We will get a shell to enter related commands. Query some domain name.

我们将获得一个shell来输入相关命令。 查询一些域名。

poftut.com
Query DNS with Nslookup
Query DNS with Nslookup
使用Nslookup查询DNS

We get the IP address of the domain in interactive mode. To exit interactive mode use exit command like below.

我们以交互方式获取域的IP地址。 要退出交互模式,请使用如下exit命令。

Interactive Usage
Interactive Usage
互动用法

反向查询(Reverse Lookup)

To get the domain name of an IP address is similar to the normal domain name lookup we will just provide the IP address of the target host like below.

要获取IP地址的域名类似于普通域名查找,我们将仅提供目标主机的IP地址,如下所示。

$ nslookup 8.8.8.8
Reverse Lookup
Reverse Lookup
反向查询

设置新的DNS服务器(Set New DNS Server)

By default, the system-provided DNS server is used. This is generally the first local cache and then modem configuration where this is set by ISP.  DNS servers can be changed like below in interactive mode.

默认情况下,使用系统提供的DNS服务器。 通常,这是第一个本地缓存,然后是调制解调器配置,由ISP进行设置。 可以像下面在交互模式下那样更改DNS服务器。

server 8.8.8.8
poftut.com
Set New DNS Server
Set New DNS Server
设置新的DNS服务器

MX查找或获取邮件服务器域名(MX Lookup or Get Mail Server Domain Name)

DNS provides information about domain names. Also, mail, sip, and other related information about the domain can be got by specifying the type parameter. In this example, we will try to get the mail server domain name.

DNS提供有关域名的信息。 另外,可以通过指定type参数来获取有关域的邮件,sip和其他相关信息。 在此示例中,我们将尝试获取邮件服务器域名。

set type=mx
poftut.com
MX Lookup or Get Mail Server Domain Name
MX Lookup or Get Mail Server Domain Name
MX查找或获取邮件服务器域名

获取SOA服务器域名(Get SOA Server Domain Name)

SOA or DNS server information can get with SOA type queries. We will set the type as soa like below and then provide the poftut.com domain name to find its SOA.

SOA或DNS服务器信息可以通过SOA类型查询获得。 我们将像下面这样将类型设置为soa,然后提供poftut.com域名以找到其SOA。

set type=soa
poftut.com
Get Soa Server Domain Name
Get Soa Server Domain Name
获取Soa服务器域名

We will get information about mail address first name server etc. from soa request.

我们将从soa请求中获取有关邮件地址名字服务器等的信息。

LEARN MORE  Linux Dig Command Tutorial With Examples
了解更多带有示例Linux Dig命令教程

批处理模式(Batch Mode)

Batch mode is the second mode. This mode usage is a simple command-line usage. Just provide command and related arguments. We do not need to enter specific nslookup shell.

批处理模式是第二种模式。 此模式的用法是简单的命令行用法。 只需提供命令和相关参数即可。 我们不需要输入特定的nslookup shell。

$ nslookup poftut.com
Batch Mode
Batch Mode
批处理模式

指定记录类型(Specify Record Type)

As DNS system have a lot of different type of records we may need to specify a specific record type in batch mode. We will use -type option and related record types in order to list only specific record types. In this example, we will list mx record type.

由于DNS系统具有许多不同类型的记录,因此我们可能需要以批处理方式指定特定的记录类型。 我们将使用-type选项和相关的记录类型,以便仅列出特定的记录类型。 在此示例中,我们将列出mx记录类型。

$ nslookup -type=mx poftut.com
Specify Record Type
Specify Record Type
指定记录类型

查询域的NS记录(Query NS Record Of A Domain)

The main use case for the nslookup is querying NS records. NS records provide information about DNS servers of the given domain name. In this example, we will list DNS servers of the poftut.com .

nslookup的主要用例是查询NS记录。 NS记录提供有关给定域名的DNS服务器的信息。 在此示例中,我们将列出poftut.com DNS服务器。

$ nslookup -type=ns poftut.com
Query NS Record Of A Domain 
Query NS Record Of A Domain
查询域的NS记录

查询邮件服务器域的MX记录(Query MX Record Of A Domain For Mail Server)

MX record is used to list mail servers. We can only list MX records of the given domain with the mx type. In this example, we will list mail servers of the poftut.com.

MX记录用于列出邮件服务器。 我们只能使用mx类型列出给定域的MX记录。 在此示例中,我们将列出poftut.com邮件服务器。

$ nslookup -type=mx poftut.com
Query MX Record Of A Domain For Mail Server
Query MX Record Of A Domain For Mail Server
查询邮件服务器域的MX记录

查询域的SOA记录(Query SOA Record Of A Domain)

SOA or Start Of Authority records provides technical information about the given domain. We can query the domain with the soa type like below.

SOA或授权开始记录提供有关给定域的技术信息。 我们可以使用以下soa类型查询域。

$ nslookup -type=soa poftut.com
Query SOA Record Of A Domain
Query SOA Record Of A Domain
查询域的SOA记录

列出域的所有Ns(名称服务器)记录(List All Ns (Nameserver) Records Of A Domain)

Up to now, we have listed DNS related information about domain name one by one. If we need to list all related information provided by a DNS server we can use any record type.

到目前为止,我们已经一一列出了与域名相关的DNS相关信息。 如果我们需要列出DNS服务器提供的所有相关信息,则可以使用any记录类型。

$ nslookup -type=any poftut.com
List All Ns Records Of A Domain
List All Ns Records Of A Domain
列出域的所有Ns记录

使用不同的DNS服务器进行查询(Use Different DNS Server For Query)

The default behavior of the nslookup command is using the default system provided DNS server. In some cases, we may need to change this default DNS server and specify one explicitly. We can add a DNS server to the end of the command. In this example, we will use 8.8.8.8 as DNS server. We can also specify the DNS server domain name.

nslookup命令的默认行为是使用系统提供的默认DNS服务器。 在某些情况下,我们可能需要更改此默认DNS服务器并明确指定一个。 我们可以在命令末尾添加一个DNS服务器。 在此示例中,我们将使用8.8.8.8作为DNS服务器。 我们还可以指定DNS服务器域名。

$ nslookup -type=any poftut.com 8.8.8.8
Use Different DNS Server
Use Different DNS Server
使用其他DNS服务器

指定与默认端口不同的端口(Specify Different Than Default Port)

The default port for DNS services is 53 . If we know that DNS service we will use is using different port we can explicitly specify the port number with the -port option like below. In this example, we will specify the port number 60.

DNS服务的默认端口是53 。 如果我们知道我们将使用的DNS服务正在使用其他端口,则可以使用-port选项显式指定端口号,如下所示。 在此示例中,我们将指定端口号60

$ nslookup -port=60 poftut.com

调试事务 (Debug Transaction)

While getting related record types there is a lot of transaction and steps which is taken under the hood. If we need to list verbose information and want to know details about nslookup we can use -debug option for this.

在获取相关记录类型时,需要进行很多事务和步骤。 如果我们需要列出详细信息,并且想了解有关nslookup详细信息,可以为此使用-debug选项。

$ nslookup -debug poftut.com
Debug Transaction
Debug Transaction
调试事务

翻译自: https://www.poftut.com/how-to-direct-and-reverse-ip-look-up-with-nslookup-in-linux-and-windows/

nslookup反向

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值