CreateReactApp Refused Me

Today, I tried to open and look for some manual. But I hit the wall; I couldn’t open it. The browser gave me the below error message:

This site can’t be reached refused to connect.

Checking the connection
Checking the proxy and the firewall

I flipped the link to my wife and she confirmed that she was able the access the link. Neither reconnecting Wi-Fi nor Logging out solved the problem.

I needed to fix it, cause I need to read the document! Errrrr. So, I started my debugging process.

First, I needed to confirm it’s not my browser’s problem. So, I used curl:

curl -vvvv
*   Trying
* Connection failed
* connect to port 443 failed: Connection refused
* Failed to connect to port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to port 443: Connection refused

The curl output showed the same result with more information; the domain got resolved to my localhost:

How weird!

I doubled-checked through ping and traceroute. Bad luck as well.

$ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.050 ms
64 bytes from icmp_seq=1 ttl=64 time=0.117 ms

$ traceroute
traceroute to (, 64 hops max, 52 byte packets
 1  localhost (  0.472 ms  0.042 ms  0.037 ms

However, the dig and nslookup didn’t think the domain should be

$ dig
...	299	IN	A	299	IN	A

$ nslookup

Non-authoritative answer:

So, it must be somewhere on my localhost overwriting the dns resolving results.

The first place I suspected was /etc/hosts.

$ cat /etc/hosts localhost

Well, it seems this file didn’t give any instruction to amend the dns resolving results.

Then, I found there was a directory that was really suspicious: /etc/resolver. What’s under this directory?

$ ls /etc/resolver

What the hell?

$ cat /etc/resolver/dev
# Lovingly generated by Pow
port 20560

Hmm, I think I found the root cause. I removed the file and cleaned the dns cache:

$ ps aux|grep dns
_mdnsresponder   64913   0.0  0.0  4381768   6468   ??  Ss   10:59AM   0:00.18 /usr/sbin/mDNSResponder
$ sudo kill -9 64913

Hooray, it worked!

$ curl -I
HTTP/2 200

Then I realized that I installed Pow several years ago and configured it for aliasing any domain *.dev to my localhost. I re-readed Pow’s documentation and found the warning:

Adding top-level domains like “.com” to POW_DOMAINS can be hazardous to your health! In the (likely) event that at some point you lock yourself out of these domains, you will be unable to reach important remote addresses like (where you can find the source code) and S3 (where Pow’s installation and uninstallation scripts are hosted). Do not panic! Delete the files Pow has created in /etc/resolver/ and DNS activity will return to normal. (You can safely use POW_EXT_DOMAINS for these domains instead.)

It applies to *.dev domain.

Lesson Learned

  • You can tamper DNS results via /etc/hosts + /etc/resolver.
  • Launching a local DNS server may be a better approach.
  • The list of top-level domains is expanding.