Skip to content

darwin.builder: Instruct user not to disable firewall#208792

Closed
Gabriella439 wants to merge 1 commit intoNixOS:masterfrom
Gabriella439:gabriella/builder_firewall
Closed

darwin.builder: Instruct user not to disable firewall#208792
Gabriella439 wants to merge 1 commit intoNixOS:masterfrom
Gabriella439:gabriella/builder_firewall

Conversation

@Gabriella439
Copy link
Contributor

It turns out that it's not necessary to disable the firewall because qemu by default binds to all ports (0.0.0.0), including 127.0.0.1.

Ideally, we would configure qemu to bind to 127.0.0.1 so that the user would not even be prompted to disable their firewall, but that doesn't work for unprivileged services on macOS.

You heard that right. On macOS an unprivileged service can bind to 0.0.0.0:22 but not 127.0.0.1:22. See:

https://developer.apple.com/forums/thread/674179

… so right now the lesser evil is just telling users to not disable the firewall rather than requiring them to run the script with sudo.

Description of changes
Things done

@Gabriella439 Gabriella439 requested a review from winterqt January 2, 2023 19:24
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jan 2, 2023
@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label Jan 2, 2023
@Gabriella439 Gabriella439 mentioned this pull request Jan 2, 2023
13 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 2, 2023
It turns out that it's not necessary to disable the firewall
because `qemu` by default binds to all ports (`0.0.0.0`),
including `127.0.0.1`.

Ideally, we would configure `qemu` to bind to `127.0.0.1` so
that the user would not even be prompted to disable their
firewall, but that doesn't work for unprivileged services on
macOS.

You heard that right.  On macOS an unprivileged service can
bind to `0.0.0.0:22` but not `127.0.0.1:22`. See:

https://developer.apple.com/forums/thread/674179

… so right now the lesser evil is just telling users to
not disable the firewall rather than requiring them to run
the script with `sudo`.
@Gabriella439 Gabriella439 force-pushed the gabriella/builder_firewall branch from 11fe793 to e330331 Compare January 2, 2023 19:46
@winterqt
Copy link
Member

winterqt commented Jan 2, 2023

Note: The first time you run this macOS will ask you if you want to open your
firewall to accept incoming connections. You can deny that request because it
is not necessary to open your firewall to use the builder.

I wasn't able to repro this, FWIW. (Is the macOS firewall opt-in?)

@Gabriella439
Copy link
Contributor Author

I actually do not remember. I had it disabled on my machine but I wasn't sure if that was because I had explicitly opted out of it before

@Gabriella439
Copy link
Contributor Author

Gabriella439 commented Jan 2, 2023

It looks like the firewall is off by default, so I'll retract this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants