Recently in Rbldnsd Category

Useful DNS Queries

| 1 Comment
I have come across a couple of handy little trick for DNS recently which I'm going to throw up here just to save me searching when I need them in the future :)

Getting The Version Of A DNS Server

To get the version of a DNS server, you can run the following command:
dig @dns_server_you_want_to_check +short version.bind chaos txt
It is very easy for the server administrator to change this to whatever they want, but it's still a handy command.

Getting The Whois Server For A Top Level Domain

I found the following command for finding the whois server for a TLD on the Nominet Blog.
dig +short _nicname._tcp.ie srv
This should return:
10 0 43 whois.domainregistry.ie.
This means that the whois server for .ie is listening to port 43 at whois.domainregistry.ie. Unfortunately, not all TLDs support this, most noticeably .com.

Graphing Rbldnsd Stats With MRTG

A while ago Michele blogged about generating stats from Rbldnsd. Since then I've had to put it into practice. During the post he mentioned Jeff Chan's script for getting the numbers from rbldnsd's stats file. The only problem with this script was that it rapidly ran out of steam when you went over ten zones. This becomes a problem when you consider that a dnsbl like countries.nerd.dk has over 200 zones.

A new script was created in order to get around this limitation, which is available here. If no argument is passed to the script, it will return the aggregate numbers for all the zones, and if the zone name is passed in as an argument it will give the numbers for that zone. In both cases it will return two lines. The first is the number of positve hits on the zone, the second line is the total number of requests to the zone.

In order to use the script with mrtg you will have to edit the $statfile variable to point at where rbldnsd is outputting it's stats. For each DNSBL, you have to setup a target in your MRTG config. The target for sbl.spamhaus.org would be:
Target[sbl.spamhaus.org]: `perl /etc/mrtg/rbldnsdstat.pl sbl.spamhaus.org` MaxBytes[sbl.spamhaus.org]: 4800000
Title[sbl.spamhaus.org]: RBLDNSD - sbl.spamhaus.org
PageTop[sbl.spamhaus.org]: <H1>sbl.spamhaus.org requests </H1>
MRTG should then be run every five minutes using cron.

About this Archive

This page is an archive of recent entries in the Rbldnsd category.

Random is the previous category.

Roads is the next category.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Creative Commons License
This blog is licensed under a Creative Commons License.
Powered by Movable Type 5.02