firewall rule for python

macports at parvis.nl macports at parvis.nl
Sun Jun 9 17:32:53 UTC 2019


On a machine running High Sierra I installed various versions of Python from macports and did port select:
python      python27        python26-apple python27 python27-apple python36 python37 none
python2     python27        python26-apple python27 python27-apple none
python3     python37        python36 python37 none

For some application I use a launchdaemon plist to start a bash script containing /opt/local/bin/python2 <pythonprog> and I get the window "Do you want the application "Python.app" to accept incoming network connections?".

I tried:
(executable) /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
(executable) /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
(application bundle) /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app
(symlink) /opt/local/bin/python
(symlink) /opt/local/bin/python2
The symlinks result in the target file. 

No difference between System Preferences / Security & Privacy / Firewall / Firewall Options 
and 
/usr/libexec/ApplicationFirewall/socketfilterfw —add <python>

What should I specify in the firewall rule? 

And for me the strangest thing is that I don't have problems with various Perl versions from macports.

Should I codesign Python? I tried, but it didn't help.

Thanks,
paul.


More information about the macports-users mailing list