How to check DNS-blacklists (dnsbl) from commandline (cmd / terminal)

There is a lot of DNS-blacklists out there. Sometimes you just want to check if your IP is listed in one.

A really easy way to do that is to use your shell, terminal, command prompt. Below i will show two examples using nslookup in windows and dig in OSX (Unix).

 

The basics is that if you get a response your IP is listed. There are different type of listings please refer to each services documentation.

You will typically get a response of 127.0.0.x where x has different meaning in different services.

Sometimes they will publish a TXT-record with the A-record to provide some more information about the listing or information on how to delist. So that i something that can be useful to lookup if listed.