Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoiding firewall warnings on macOS Sierra when built from source #8911

Closed
gibfahn opened this issue Oct 3, 2016 · 7 comments
Closed

Avoiding firewall warnings on macOS Sierra when built from source #8911

gibfahn opened this issue Oct 3, 2016 · 7 comments
Labels
macos Issues and PRs related to the macOS platform / OSX. test Issues and PRs related to the tests.

Comments

@gibfahn
Copy link
Member

gibfahn commented Oct 3, 2016

  • Version: master
  • Platform: macOS Sierra (10.12)
  • Subsystem: test

I've been getting this popup a bunch of times after running make -j8 test, does anyone know a good way of avoiding this when building/testing node?

Do you want the application “node” to accept incoming network connections?

image

@MylesBorins
Copy link
Contributor

AFAIK the only real solution is to turn off the firewall. Since you are making a new binary each compile you are going to have to make a new firewall rule each time.

Will be very happy if I'm wrong

@gibfahn
Copy link
Member Author

gibfahn commented Oct 3, 2016

😭

@mscdex mscdex added test Issues and PRs related to the tests. macos Issues and PRs related to the macOS platform / OSX. labels Oct 3, 2016
@Fishrock123 Fishrock123 changed the title Avoiding firewall warnings on macOS Sierra Avoiding firewall warnings on macOS Sierra when built from source Oct 4, 2016
@gibfahn
Copy link
Member Author

gibfahn commented Oct 7, 2016

I'll close this as it doesn't look like there's a better option. If anyone has any better ideas please do comment.

@gibfahn gibfahn closed this as completed Oct 7, 2016
@danbev
Copy link
Contributor

danbev commented Nov 1, 2016

Not sure that this will work in all cases but this has been working for me after I upgrade/reboot my system. Just throwing this out there incase it might be useful:

#/bin/bash
FW="/usr/libexec/ApplicationFirewall/socketfilterfw"
# Duplicating these commands on purpose as the symbolic link node might be
# linked to either out/Debug/node or out/Release/node depending on the BUILDTYPE
$FW --remove $PWD/out/Debug/node
$FW --remove $PWD/out/Debug/node
$FW --remove $PWD/out/Release/node
$FW --remove $PWD/out/Release/node
$FW --listapps

$FW --add $PWD/out/Debug/node
$FW --add $PWD/out/Release/node
$FW --add $PWD/node

$FW --unblock $PWD/out/Debug/node
$FW --unblock $PWD/out/Release/node
$FW --unblock $PWD/node

$FW --listapps

@danbev
Copy link
Contributor

danbev commented Nov 30, 2016

@gibfahn @thealphanerd I've been using the above script and this sorts out the firewall issue for me when it happens. I'm wondering if this might be nice to have checked into the tools directory or some other place place (and perhaps a note somewhere in BUILDING.MD pointing to it so that people can find it?

@gibfahn
Copy link
Member Author

gibfahn commented Nov 30, 2016

@danbev Having it as a standard script makes sense to me. If people working on core are unblocking their firewalls with ad-hoc scripts (or disabling them entirely), we should definitely have a standard script that people can run.

Do you know what causes this script to need to be rerun? Is it because the firewall sees a new node binary when you rebuild node?

@danbev
Copy link
Contributor

danbev commented Dec 2, 2016

Do you know what causes this script to need to be rerun? Is it because the firewall sees a new node binary when you rebuild node?

I'm still not sure what the exact reason is but for me I have to re-run the script after a reboot. But I've also had to do it occasionally after updating my master branch. I first thought it had to do with the node, out/Debug/node, and out/Release/node files being modified/replaced, but I can remove them and rebuild without having to re-run the firewall script. I need to look into this a little more to understand it fully.

danbev added a commit to danbev/node that referenced this issue Dec 4, 2016
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: nodejs#8911
danbev added a commit to danbev/node that referenced this issue Dec 9, 2016
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: nodejs#8911
PR-URL: nodejs#10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Fishrock123 pushed a commit that referenced this issue Dec 13, 2016
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 16, 2017
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 16, 2017
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 24, 2017
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 31, 2017
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this issue Feb 1, 2017
Currently, there are a number of popups that get displayed when running
the tests asking to accept incoming network connections. Rules can be
added manually to the socket firewall on Mac OS X but getting this right
might not be obvious and quite a lot of time can be wasted trying to get
the rules right. This script hopes to simplify things a little so that
it can be re-run when needed.

The script should be runnable from both the projects root directory and
from the tools directory, for example:
$ sudo ./tools/macosx-firewall.sh

Fixes: #8911
PR-URL: #10114
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos Issues and PRs related to the macOS platform / OSX. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

4 participants