O'Reilly logo

Absolute FreeBSD, 2nd Edition by Michael W. Lucas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basic DNS Tools

FreeBSD includes several tools for inspecting DNS information. Since most DNS runs over UDP (User Datagram Protocol, see Chapter 6), you cannot use telnet to manually query a server as we will do with email and web services later. Your only access to live DNS information is through host(1) and dig(1).

The host(1) Command

Use host(1) for a quick forward DNS check (finding the IP address of a known hostname). For example, to check my publisher's web page, I do the following:

# host www.nostarch.com
www.nostarch.com has address 72.32.92.4

This is perhaps the simplest DNS query you can have: "Here's a hostname, what's its IP address?" Other seemingly simple queries generate more complicated results.

# host www.cnn.com
 www.cnn.com is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required