4

I see that I can find the public IP address for my MBP using

Current IP Address

I wish to open a port in my machine to run a servlet. I see a link

How to open a port in MBP

However, when I open the port, run the flask based service in the port and check if the service is visible,

<public IP Address>:<Port Number>/service?file=<file>

I get

This page isn’t working

IP Address didn’t send any data.

ERR_EMPTY_RESPONSE

I wish to know how to make a service accessible to the web from my machine with an open port.

  • Are you trying to use port 80 for a web page? Or something else? – Basil Bourque Dec 25 '17 at 7:22
  • 1
    How is your Mac connected to the internet? Is there a router or such inbetween? Is the port open on the router and does traffic on this port get forwarded to your Mac? – nohillside Dec 25 '17 at 11:09
  • Also, instead of referring to a documentation on how to open a port, can you please add the relevant part of your pf.conf directly to the question. And can you try accessing it locally with localhost/127.0.0.1 as the IP address? – nohillside Dec 25 '17 at 11:12
  • The mac is connected using a router. How do I open the port? When I check with Network Utility, it says the port is not open with the public IP address. I wish to use the service from another machine. so cannot use localhost. – trialcritic Dec 25 '17 at 17:35
  • You have to find the user guide for your router, in there you’ll be able to find some kind of a guide explaining how to enable port forwarding. If your ISP is using a NAT, this won’t work... – Harcker Dec 25 '17 at 21:52

You must log in to answer this question.

Browse other questions tagged .