feat(securedns): add NetworkManager dispatcher#1370
Merged
RoyalOughtness merged 5 commits intosecureblue:stagingfrom Sep 22, 2025
Merged
feat(securedns): add NetworkManager dispatcher#1370RoyalOughtness merged 5 commits intosecureblue:stagingfrom
RoyalOughtness merged 5 commits intosecureblue:stagingfrom
Conversation
cc669f9 to
d334033
Compare
Fixes an issue where Proton VPN does not set an explicit dns-search domain. Creates a NetworkManager dispatcher that applies key=value pairs in the [vpn] section of /etc/NetworkManager/sb-connection-defaults.conf to any new vpn/wireguard connections. It's quite generic as to allow per-connection hardening options (e.g. MAC randomisation) and per-connection DNS easily in future.
d334033 to
73e41a6
Compare
c301a8e to
f8e373a
Compare
files/system/etc/NetworkManager/dispatcher.d/pre-up.d/secureblue_vpn.py
Outdated
Show resolved
Hide resolved
files/system/etc/NetworkManager/dispatcher.d/pre-up.d/secureblue_vpn.py
Outdated
Show resolved
Hide resolved
files/system/etc/NetworkManager/dispatcher.d/pre-up.d/secureblue_vpn.py
Outdated
Show resolved
Hide resolved
3ea7e54 to
84abc1b
Compare
RoyalOughtness
approved these changes
Sep 22, 2025
RoyalOughtness
pushed a commit
that referenced
this pull request
Sep 22, 2025
* feat(securedns): dispatcher, initially for VPNs (close #1368) Fixes an issue where Proton VPN does not set an explicit dns-search domain. Creates a NetworkManager dispatcher that applies key=value pairs in the [vpn] section of /etc/NetworkManager/sb-connection-defaults.conf to any new vpn/wireguard connections. It's quite generic as to allow per-connection hardening options (e.g. MAC randomisation) and per-connection DNS easily in future.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Effects:
ipv4.dns-searchfrom~to.for all new VPN connections.Changelog:
/etc/NetworkManager/sb-connection-defaults.conf, a config file with a[vpn]section.key = valuepairs in this section are applied to all new VPN connections.It's written quite generically to allow for this possible roadmap:
[wan]section to the config file to apply e.g. custom DNS servers to each connection, which can then be opted out of manually on a case-by-case basis.Future work:
NetworkManager-dispatcher.serviceto give the dispatcher least privileges, in line with improve systemd sandboxing and autostart services #114.