Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Firewall setting to connect to the localhost on macOS with iOS device

I have local server using MAMP.

I can access the local website via localhost, localhost:80,(private IP) and (private IP):80 where my privateIP is 192.168.x.x.


Then I try to connect the local website with my iPad using internet sharing via wifi and it failed. None of the four address above did not work. Oh, of course I used (my Mac Name).local:80 syntax instead.


I found the culprit, that is firewall setting because it worked fine when I turn off firewall of macOS.( At that time, I can accessed to the website via (private IP):80, and can't connected it via (my Mac Name).local:80. It's a tiny issue and doesn't matter.)


What I want to know is if it is possible to access localhost with iOS while activating some part of function of macOS's firewall. And if it is possible, how to do that?

I tested by myself turning on and allowing all options in the firewall setting but it failed. Only turning off the 'firewall' itself worked. So I suspect I have to add something in the 'allow incoming connection' pane.


Thanks for your advice.

MacBook Pro with Touch Bar

Posted on Feb 23, 2020 12:48 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 23, 2020 6:49 AM

omal3 wrote:

I have local server using MAMP.

I can access the local website via localhost, localhost:80,(private IP) and (private IP):80 where my privateIP is 192.168.x.x.

Then I try to connect the local website with my iPad using internet sharing via wifi and it failed.

What I want to know is if it is possible to access localhost with iOS while activating some part of function of macOS's firewall. And if it is possible, how to do that?

I tested by myself turning on and allowing all options in the firewall setting but it failed.

Only turning off the 'firewall' itself worked. So I suspect I have to add something in the 'allow incoming connection' pane.



You answer your own question. " Only turning off the 'firewall' itself worked."


If you are on your own Network, behind a router it has its own Firewall. You do not need or necessarily want the the Security & Privacy Firewall turned on— as you discovered it only hobbles your ability to connect.


In an effort to micro manage Firewall connection in the default macOS, there are limited "Options" unlocking the padlock as a possibility. This may not cover all scenarios such as your example MAMP localhost.


There are third party software that may allow for this functionality, but I do not recommend, unless under certain mission critical work flow conditions.


Simply turn off Firewall. If out & about using free WiFI (coffee shop, etc.) would be one example where caution should be expressed.


Use a firewall to prevent unwanted connections on Mac ...


OS X: About the application firewall - Apple Support



.

.

Similar questions

6 replies
Question marked as Top-ranking reply

Feb 23, 2020 6:49 AM in response to omal3

omal3 wrote:

I have local server using MAMP.

I can access the local website via localhost, localhost:80,(private IP) and (private IP):80 where my privateIP is 192.168.x.x.

Then I try to connect the local website with my iPad using internet sharing via wifi and it failed.

What I want to know is if it is possible to access localhost with iOS while activating some part of function of macOS's firewall. And if it is possible, how to do that?

I tested by myself turning on and allowing all options in the firewall setting but it failed.

Only turning off the 'firewall' itself worked. So I suspect I have to add something in the 'allow incoming connection' pane.



You answer your own question. " Only turning off the 'firewall' itself worked."


If you are on your own Network, behind a router it has its own Firewall. You do not need or necessarily want the the Security & Privacy Firewall turned on— as you discovered it only hobbles your ability to connect.


In an effort to micro manage Firewall connection in the default macOS, there are limited "Options" unlocking the padlock as a possibility. This may not cover all scenarios such as your example MAMP localhost.


There are third party software that may allow for this functionality, but I do not recommend, unless under certain mission critical work flow conditions.


Simply turn off Firewall. If out & about using free WiFI (coffee shop, etc.) would be one example where caution should be expressed.


Use a firewall to prevent unwanted connections on Mac ...


OS X: About the application firewall - Apple Support



.

.

Feb 24, 2020 6:10 AM in response to omal3

omal3 wrote:

Thank you for your technical advices, it helped a lot. By the way, my router is old model provided by the internet provider and I can't access to the log neither on GUI nor command line access, so I concerns about security on my router.


Yes typically these rentals are highly outdated docsis (Data Over Cable Service Interface Specification) routers/modems from an old fleet of work horses. Not a fan of combination modem/routers


Do your own research here modems—

https://kb.netgear.com/000060401/What-is-the-difference-between-DOCSIS-3-0-and-3-1


Previously branded as DOCSIS 3.1 Full Duplex, these technologies have been rebranded as part of DOCSIS 4.0

https://www.cablelabs.com/technologies/docsis-4-0-technology



It is typically more economical to purchase your own state of the art modems and routers for your own Network cf. to using outdated hardware supplied my your ISP and their monthly rental. Do the math.


It is simply a matter of calling our ISP and provisioning your new hardware—in this you can trust your Network is running optimally with state of the art— bonded channels up and down, the technology is always advancing.


example:


ARRIS — 32 downstream x 8 upstream DOCSIS 3.0 bonded channels, (or 2 downstream x 2 upstream OFDM DOCSIS 3.1 channels).

https://www.arris.com/surfboard/products/cable-modems/sb8200/


docsis 3.1 - Netgear


.

.

.

Firewall setting to connect to the localhost on macOS with iOS device

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.