Skip to main content
HandyWeb

Check Internet Access in Iran with nw

Build the nw doctor command for Iran. It checks your device, domestic sites, and foreign sites, and gives one clear result.

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

Check this device and region (doctor)

First it reads the network setup of this device. Then it sends one HTTPS request to each domestic and international test site. With --region ir, it uses the Iran test sites.

How to read the result

  • The result local means the problem is on this device.
  • The result domestic means the domestic sites do not open.
  • The result international means the foreign sites do not open, but the domestic ones do.
  • The other results are healthy, upstream, and partial.

Exit codes

0: healthy. 1: a problem. 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. Add a DNS server if you want. You can leave it empty.
  2. Copy the command. Run it in your terminal.
  3. Read the result at the end: local, domestic, international, and so on.

Questions and Answers

What does the result international mean?

Foreign sites did not open from your device, but domestic sites did. The problem is on the way to the global internet, not on your device.

What does this command do on the network?

It sends one HTTPS request to each reference target. It reads the network setup of your device without sending packets.

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)