Troubleshooting DNS

When it comes to networking, all problems are caused by DNS. Well, most of the time anyway.

nslookup

nslookup is the first tool to use. Use nslookup to check if the domain name is directed to your server / host IP address.

Steven’s Guide to the internet has a good explanation of how to use this command.

nslookup www.yadafaber.com

traceroute (tracert)

The traceroute command displays how packets were routed through the network. It also shows delays at each of the stops. Cloudflare’s article shows how to run this command on both windows & linux. 

$ traceroute www.yadafaber.com

If after a few lines, you see:

12: * * *

That means the connection is timing out. You can wait and it might resolve or you can press control + c (control button and “c” button at the same time) to exit

Ping

Ping will check to see if your hostname is available across a network. Ping is used to test the ability of the source computer to reach a specified destination computer. The ping command is a simple way to verify that a computer can communicate over the network with another computer or network device. 

$ ping www.yadafaber.com

systemctl status apache2

You can check to see if apache is running on your server. You will see something like active (running) if apache is running.

$ systemctl status apache2​

Check Ports That Are Listening

Check ports that are listening for connections. Such as port 80 for HTTP and 443 for SSH. netstat -tupln is ran. More about netstat flags here.

$ netstat -tulpn

whatsmydns.net

With whatsmydns.net, you can check to see how your DNS records have propagated around the world. Simply put your domain into the text box at the top.

If you see a Token Mismatch, you may just need to reload the page. For whatsmydns.net the Token Mismatch error is related to a timeout of a token generated by the website that allows you to use their search/lookup system. Normally you can refresh the whatsmydns.net website to get a new token and perform searches. It appears they use this token to ensure a 3rd party does not use their system and that instead users go to their site directly. 

whatsmydns.net

DNS History

This tool can be used to search DNS history. One reason you might want to do this is to clean up stale DNS Records that a bad actor could set up a legit SSL certificate on a subdomain and start fishing on an old subdomain. Yikes!

Here is the DNS History Tool

Leave a Comment

Your email address will not be published. Required fields are marked *