MacPorts question

mf2k at macports.org mf2k at macports.org
Thu Sep 29 14:01:49 PDT 2016


> On Sep 29, 2016, at 2:05 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 
>> On Sep 29, 2016, at 10:30 AM, Zachary Waibel <zjwaibel at gmail.com> wrote:
>> 
>> I've installed the latest MacPorts and my issue is that if I start apache2 using the command "sudo port load apache2” I can then find my website from outside my network.  However, after restarting my Mac and I cannot find my website anymore.  It turns out if I turn off macOS’s Firewall I can then find the website from the outside again.  The other way I can solve it is by doing "sudo port unload apache2” and then "sudo port load apache2”, which seems to open port 80.  However, after a restart the port is not opened, but apache2 is running.  So is MacPorts not compatible with El Capitan’s Firewall?
>> 
>> Thank you for any help!
> 
> Writing to the macports-users mailing list is probably the right thing to do. I'm Cc'ing the list now. To reply, please make sure you're subscribed to the list first.
> 
> I've also been frustrated with the new macOS firewall for some years. I don't understand it. Maybe someone else on the list does and can give us both some advice.

El Capitan uses PF [1] for the firewall. I believe you need to edit the configuration file manually and use the command line. Apple’s GUI in System Preferences is too simple to do this. 

 - Edit /etc/pf.conf with your favorite text editor
 - Add the following lines to the bottom of the file:
# Macports Apache
pass in proto tcp from any to any port 80
 - Reboot or manually reload the firewall:
sudo pfctl -vnf /etc/pf.conf


[1] <https://en.wikipedia.org/wiki/PF_(firewall)>

Cheers!
Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20160929/f5aabd13/attachment.html>


More information about the macports-users mailing list