Skip to content

Instantly share code, notes, and snippets.

@smaeda-ks
Last active April 26, 2024 19:11
Show Gist options
  • Save smaeda-ks/5997018d5fe5dce44d047299829288e1 to your computer and use it in GitHub Desktop.
Save smaeda-ks/5997018d5fe5dce44d047299829288e1 to your computer and use it in GitHub Desktop.
network debug
# run these commands from the same (problematic) network/machine
# Make sure to capture timestamp
$ date
# This shows the reporter's global IP address
$ curl https://ipinfo.io/
# Test reachability to 76.76.21.21
$ ping -c 4 76.76.21.21
# Test reachability to cname.vercel-dns.com
$ ping -c 4 cname.vercel-dns.com
# Dig your domain
# Do not include "https://" (e.g., just type "dig example.com")
$ dig ${replace-with-your-domain}
# Dig your domain via public DNS
# Do not include "https://" (e.g., just type "dig example.com @8.8.8.8")
$ dig ${replace-with-your-domain} @8.8.8.8
# curl content
$ curl -sv https://${replace-with-your-domain}
# traceroute or mtr result
$ sudo mtr -wr -c 20 76.76.21.21
@smaeda-ks
Copy link
Author

smaeda-ks commented Jul 12, 2023

Please don't forget to replace ${replace-with-your-domain} with your domain (e.g., ${replace-with-your-domain} -> example.com)

For Windows PC (windows 10+), try the following instead:

# This shows the reporter's global IP address
> curl.exe https://ipinfo.io/

# Test reachability to 76.76.21.21
> ping -n 4 76.76.21.21

# Test reachability to cname.vercel-dns.com
> ping -n 4 cname.vercel-dns.com

# DNS resolve your domain
# Do not include "https://" (e.g., just type "nslookup example.com")
> nslookup ${replace-with-your-domain}

# DNS resolve you domain via public DNS
# Do not include "https://" (e.g., just type "nslookup example.com 8.8.8.8")
> nslookup ${replace-with-your-domain} 8.8.8.8

# curl content
> curl.exe -sv https://${replace-with-your-domain}

# traceroute
> tracert 76.76.21.21

Don't know how to open the Command Prompt window? See: https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/

You can also install WSL2 and run the original Linux commands above: https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment