I am trying to let other computers to access my local server but I tried myself locally that I cannot access it locally even myself.

Several things you should know:

My target

Visit my server via

What I can do now

I can access my server via these two ways:

IP configuration

Result of ifconfig | grep inet

      inet addr:  Bcast:  Mask:
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::f767:cd56:9641:d3a9/64 Scope:Link
      inet addr:  Mask:
      inet6 addr: ::1/128 Scope:Host


Output of cat /etc/hosts:   localhost.localdomain localhost   hearen.pc   hearen-OptiPlex-7050   staging   arthas  localhost hearen.pc


$ sudo ufw disable
Firewall stopped and disabled on system startup
$ sudo ufw status
Status: inactive

Is there some way that I missed out? All I want is to let others access my server via

Any help will be appreciated :)

Updated 2019-01-10

With the help of @Ed King, I check the ports via sudo lsof -i -P -n | grep LISTEN | grep 5201 and only was listenned on.

Problem solved after I configured my Angular server to listen on .

  • In the /etc/hosts file above localhost points to 2 different IP addresses, is this allowed? Will it work?
    – NZ Dev
    Jan 25 '21 at 9:56

Check that your server is listening:

sudo lsof -n | grep TCP | grep LISTEN

You can also check the route using nc. Start nc on the server listening on an unused port and then connect from another machine -- this will verify iptables and routes are correct.

My guess is that you're listening on the localhost only.

  • Thank you, you are leading the right direction. It is and now I configure it to listen on Problem solved. Thanks for the help. I will mark your answer after minutes when I am allowed.
    – Hearen
    Jan 10 '19 at 4:16
  • Thanks for making me think in the correct direction. If you landed here due to google firebase echosystem, please refer to - stackoverflow.com/questions/58260877/… Jul 30 '21 at 12:54

I fixed this issue with following ways:

  1. I run the command

    sudo ufw status 

    And I found that the port 80 (in my case) was not in the list.

  2. Then I run the command

    sudo ufw allow 80

    This fixed the issue.

  • This will work if ufw was his problem -- in his question he disabled ufw and still could not connect.
    – Ed King
    Jul 31 '21 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.