Difference between revisions of "Dnstest"
Jump to navigation
Jump to search
(New page: This program simply checks whether or not you have the authoritative nameserver for a given domain. Implicitly called by the other dns* programs I've written, all it does is look up a rand...) |
|||
Line 1: | Line 1: | ||
==Intro== | |||
This program simply checks whether or not you have the authoritative | This program simply checks whether or not you have the authoritative | ||
nameserver for a given domain. | nameserver for a given domain. It is implicitly called by the other | ||
I've written, all it does is look up a random subdomain and see if the | dns* programs I've written, all it does is look up a random subdomain | ||
response comes back. | and see if the response comes back. | ||
==Usage== | |||
<pre> | |||
./dnstest --domain <domain> | |||
-h --help | |||
Help (this page). | |||
-d --domain <domain> | |||
The domain name to check. The lookup will be for [random].domain. | |||
--dns <server> | |||
Set the DNS server. Default: the system's first DNS server. | |||
-s --source <address> | |||
The local address to bind to. Default: any (0.0.0.0) | |||
-p --port <port> | |||
The local port to listen on. I don't recommend changing this. | |||
default: 53. | |||
--rport <port> | |||
The port to send the request to. Default: 53. | |||
-u --username | |||
Drop privileges to this user after opening socket (default: 'nobody') | |||
-V --version | |||
Print the version and exit | |||
</pre> | |||
==Example== | |||
There isn't really much to this program, but here's how it looks | |||
running on my laptop (which is the authoritative server for | |||
skullseclabs.org): | |||
<pre> | |||
$ sudo ./dnstest | |||
Listening for requests on 0.0.0.0:53 | |||
Sending request to 208.81.7.10:53 | |||
Trying to look up domain: avobwnjlopakgmdt.skullseclabs.org | |||
Received a response: avobwnjlopakgmdt.skullseclabs.org | |||
Contgratulations, you have the proper DNS server for this domain! | |||
</pre> |
Latest revision as of 16:06, 21 February 2010
Intro
This program simply checks whether or not you have the authoritative nameserver for a given domain. It is implicitly called by the other dns* programs I've written, all it does is look up a random subdomain and see if the response comes back.
Usage
./dnstest --domain <domain> -h --help Help (this page). -d --domain <domain> The domain name to check. The lookup will be for [random].domain. --dns <server> Set the DNS server. Default: the system's first DNS server. -s --source <address> The local address to bind to. Default: any (0.0.0.0) -p --port <port> The local port to listen on. I don't recommend changing this. default: 53. --rport <port> The port to send the request to. Default: 53. -u --username Drop privileges to this user after opening socket (default: 'nobody') -V --version Print the version and exit
Example
There isn't really much to this program, but here's how it looks running on my laptop (which is the authoritative server for skullseclabs.org):
$ sudo ./dnstest Listening for requests on 0.0.0.0:53 Sending request to 208.81.7.10:53 Trying to look up domain: avobwnjlopakgmdt.skullseclabs.org Received a response: avobwnjlopakgmdt.skullseclabs.org Contgratulations, you have the proper DNS server for this domain!