I've been developing Node.js apps on my localhost on port 1337 for last two years with no problem as shown below.
$ node app App started on port 1337
Today I wanted to test how things go with default port 80, so I did:
$ sudo node app App started on port 80
But after that my network went crazy. Now I can't access any local address including localhost. When I ping to localhost it points to some weird public IP address (184.108.40.206) instead of 127.0.0.1.
$ ping localhost PING localhost.local (220.127.116.11): 56 data bytes ...
18.104.22.168 is not my public IP address.
When I telnet I see the same wrong IP address:
$ telnet localhost Trying 22.214.171.124... telnet: connect to address 126.96.36.199: Connection refused telnet: Unable to connect to remote host
My /etc/hosts is the following:
127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost
Can anybody suggest what's wrong?
I'm completely out of guesses and can't even continue my work.