0

I was requested to create a Web Server with an API in it to test firewall rule we are planning to implement soon. I am quite new with all this network stuff, so I'm a bit lost on it.

I need to call this API from another machine. The JsonServer is using my port 3000, when I request my API through Postman, using https://localhost:3000/posts, my JSON file is returned normally, however when I change the localhost, to my IP, my connection is being refused. I decided to install a WebServer, to test it and I could access the default Apache page from my others machines. I opened the port 3000 on my server, but I couldn't. The WebServer is working with my IP as well. It seems to be something with my port 3000, and I a not sure about how to fix that.

I executed the command:

sudo lsof -i -P -n | grep 3000

And this was my output

node      29472           user 22u  IPv4 254348      0t0  TCP 127.0.0.1:3000 (LISTEN)

Any ideas how can I access my API from another machine?

3
  • Are you using the IP of the computer in the local network, which might be something like 192.168.x.x?
    – harrymc
    Jul 29, 2022 at 8:58
  • When I type 'ip a', there is a IPv4, this is the one Im using, which is 10.104.x.x, couldnt find any 192.168.x.x
    – Donzera
    Jul 31, 2022 at 23:43
  • 10.x.x.x is a local network IP, although 10.104.x.x is uncommon. Can you telnet to port 3000?
    – harrymc
    Aug 1, 2022 at 9:31

0

You must log in to answer this question.

Browse other questions tagged .