Fortinet black logo

CLI Reference

nslookup

nslookup

Use this command to query the DNS server for domain name or IP address mapping or for any other specific DNS record.

Syntax

execute nslookup name <fqdn | ip> type <type> class <class> server <dns_server> port <port_number>

Variable

Description

Default

name <fqdn | ip> type <type> class <class> server <dns_server> port <port_number>

<fqdn | ip>: enter either an IP address or a fully qualified domain name (FQDN) of a host.

<type>: optionally specify the DNS query type:

A -- host address

AAAA -- IPv6 address

ANY -- all cached records

CNAME -- canonical name

DLV -- DNSSEC lookaside validation

DNSKEY -- DNS key

DS -- delegation signer

MX -- mail exchanger

NS -- authoritative name server

NSEC -- next SECure

NSEC3 -- NSEC3 parameters

PTR -- domain name pointer

RRSIG -- DNSSEC signature

SOS -- start of authority zone

SPF -- sender policy framework

TA -- DNSSEC trust authorities

TXT -- text string

The default type is A.

<class>: optionally specify the DNS class type: either IN or ANY.

<dns_server>: optionally specify the DNS server’s host name or IP address. If you do not specify the server here, FortiMail will use its local host DNS settings.

<port_number>: optionally specify the port number of the DNS server.

A

ANY

53

Example

You could use this command to determine the DNS resolution for the fully qualified domain name mail.example.com

execute nslookup name mail.example.com

The CLI would display the following:

Name: example.com

Address: 192.168.1.15

Similarly, you could use this command to determine the domain name hosted on the IP address 192.168.1.15:

execute nslookup name 192.168.1.15 type ptr

The CLI would display the following:

Address: 192.168.1.15

Name: mail.example.com

You could also use this command to determine the host that is mail exchanger (MX) for the domain example.com:

execute nslookup name example.com type mx

The CLI would display the following:

example.com mail exchanger = 10 mail.example.com.

Related topics

ping

traceroute

system dns

nslookup

Use this command to query the DNS server for domain name or IP address mapping or for any other specific DNS record.

Syntax

execute nslookup name <fqdn | ip> type <type> class <class> server <dns_server> port <port_number>

Variable

Description

Default

name <fqdn | ip> type <type> class <class> server <dns_server> port <port_number>

<fqdn | ip>: enter either an IP address or a fully qualified domain name (FQDN) of a host.

<type>: optionally specify the DNS query type:

A -- host address

AAAA -- IPv6 address

ANY -- all cached records

CNAME -- canonical name

DLV -- DNSSEC lookaside validation

DNSKEY -- DNS key

DS -- delegation signer

MX -- mail exchanger

NS -- authoritative name server

NSEC -- next SECure

NSEC3 -- NSEC3 parameters

PTR -- domain name pointer

RRSIG -- DNSSEC signature

SOS -- start of authority zone

SPF -- sender policy framework

TA -- DNSSEC trust authorities

TXT -- text string

The default type is A.

<class>: optionally specify the DNS class type: either IN or ANY.

<dns_server>: optionally specify the DNS server’s host name or IP address. If you do not specify the server here, FortiMail will use its local host DNS settings.

<port_number>: optionally specify the port number of the DNS server.

A

ANY

53

Example

You could use this command to determine the DNS resolution for the fully qualified domain name mail.example.com

execute nslookup name mail.example.com

The CLI would display the following:

Name: example.com

Address: 192.168.1.15

Similarly, you could use this command to determine the domain name hosted on the IP address 192.168.1.15:

execute nslookup name 192.168.1.15 type ptr

The CLI would display the following:

Address: 192.168.1.15

Name: mail.example.com

You could also use this command to determine the host that is mail exchanger (MX) for the domain example.com:

execute nslookup name example.com type mx

The CLI would display the following:

example.com mail exchanger = 10 mail.example.com.

Related topics

ping

traceroute

system dns