nw Command Builder
Build the exact nw command to test DNS, TCP, TLS, or HTTP, trace a path, or find why a connection fails. Learn how to read the result and the exit code.
Diagnose a connection (diagnose)
Tests a destination one step at a time: DNS, then TCP, then TLS, then HTTP. It shows the first step that fails.
How to read the result
- In the summary, each step is ok, FAIL, partial, skipped, or not run.
- Find the first step that is not ok. The steps after it are skipped, and the reason is next to each one.
- The hypotheses section lists possible causes. Confidence is low, medium, or high. These are guesses, not final answers.
Exit codes
0: no problem. 1: an error or a warning. 2: wrong command. 130: stopped with Ctrl-C.
Install nw
If you have Go, this one command is enough. It puts the file in $(go env GOPATH)/bin, usually ~/go/bin.
Other ways to install are on the nwrk.ir install page: ready-made builds for Linux, macOS, and Windows, and install scripts.
The install scripts download a script and run it. Read the script before you run it.
nwrk.ir install page (opens in a new tab)This page only builds the command. You run nw yourself, on your own device.
How to Use It
- Pick the check.
- Type the target. Add DNS servers if you need them.
- Copy the command and run it in your terminal.
- Read the section on how to read the result.
Questions and Answers
Does this page run the test?
No. The page only builds the text of the command. You run the test yourself with the nw program in your terminal.
What is nw?
A free, open-source (MIT) command-line tool that tests a network. Its install guide and docs are on nwrk.ir.
Which check do I run when a site does not open?
Start with diagnose. It shows the first step that fails (DNS, TCP, TLS, or HTTP). If foreign sites do not open, try doctor with --region ir.
Good to Know
This page only builds the command. It runs no test. To run it, install nw on your own device. The commands come from the nwrk.ir docs for version 0.5.
Related Tools
- IP Subnet Calculator (CIDR)Work out the network, broadcast, mask, host range, and address count for IPv4 and IPv6, and see whether an address is private or reserved.
- HTTP Status Code ReferenceEvery HTTP status code, from 200 and 301 to 404 and 503, with its name and a short explanation; search by code or word.
Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)