Skip to main content
HandyWeb

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.

Example: 1.1.1.1 or tls://9.9.9.9 or https://dns.google/dns-query
Profile

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.

go install github.com/radestsam/nwrk/cmd/nw@latest

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

  1. Pick the check.
  2. Type the target. Add DNS servers if you need them.
  3. Copy the command and run it in your terminal.
  4. 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.

Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)