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.
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.
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
- Add a DNS server if you want. You can leave it empty.
- Copy the command. Run it in your terminal.
- 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.
Related Tools
- Diagnose Why a Website Won't Load with nwBuild the nw diagnose command. It tests DNS, TCP, TLS, and HTTP one by one and shows the first step that fails, so you know where the problem is.
- Show Network Settings with nwBuild the nw network show command to see the network cards, routes, DNS servers, and proxy of your own device. Useful before you report a network problem.
- nw Command BuilderBuild 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.
Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)