Skip to content

Configure network interfaces to respect DNS settings - #1043

Merged
dhh merged 1 commit into
omacom:devfrom
jardahrazdera:network-dns-config
Aug 24, 2025
Merged

dhh merged 1 commit into
omacom:devfrom
jardahrazdera:network-dns-config

Conversation

@jardahrazdera

Copy link
Copy Markdown
Contributor

Follow-up to #752 implementing @dhh's request to ensure network interfaces properly respect DNS configuration.

The script now configures systemd-networkd to prevent DHCP from overriding custom DNS settings:

  • Sets UseDNS=no for both DHCPv4 and IPv6AcceptRA when using Cloudflare/Custom DNS
  • Removes UseDNS=no when using DHCP mode
  • Only affects primary interfaces (wlan0, ethernet), excludes docker/loop interfaces

This ensures the DNS configuration chosen by the user is actually respected by all network interfaces.

Implements DHH's requirement to ensure wlan0 and ethernet interfaces
respect the DNS configuration while excluding docker/loop interfaces.

When using Cloudflare or Custom DNS:
- Sets UseDNS=no in DHCPv4 sections
- Sets UseDNS=no in IPv6AcceptRA sections
- Only configures primary interfaces (en*, eth*, wl*)
- Restarts both systemd-networkd and systemd-resolved

When using DHCP:
- Removes UseDNS=no to allow DHCP provided DNS
- Restores default behavior for all interfaces

Script size increased from 58 to 89 lines to properly handle all
network interfaces as requested.
@jardahrazdera

Copy link
Copy Markdown
Contributor Author

Note: As discussed in #752, we might want to consider using Quad9 (9.9.9.9) as the fallback DNS instead of Google for better privacy consistency. Users choosing Cloudflare likely value privacy, so falling back to Google might not align with their preferences. This could be a future improvement if the team agrees.

@dhh

dhh commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

I'm good with 9.9.9.9

@dhh

dhh commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

This won't mess with tailscale0 and docker bridge networks, right?

@dhh

dhh commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

Ah, I see you already mentioned that's taken care of 👌

@dhh
dhh merged commit c0770fc into omacom:dev Aug 24, 2025
jardahrazdera added a commit to jardahrazdera/omarchy that referenced this pull request Aug 24, 2025
Replace Google DNS fallback with Quad9 (9.9.9.9, 149.112.112.112)
for better privacy consistency. Users choosing Cloudflare likely
value privacy, so Quad9 is a more appropriate fallback than Google.

As discussed in omacom#752 and approved by @dhh in omacom#1043.
@jardahrazdera

Copy link
Copy Markdown
Contributor Author

@dhh Thanks for the merge! Quad9 PR is up: #1046

dhh pushed a commit that referenced this pull request Aug 24, 2025
Replace Google DNS fallback with Quad9 (9.9.9.9, 149.112.112.112)
for better privacy consistency. Users choosing Cloudflare likely
value privacy, so Quad9 is a more appropriate fallback than Google.

As discussed in #752 and approved by @dhh in #1043.
OmarSkalli pushed a commit to OmarSkalli/omarchy that referenced this pull request Aug 26, 2025
Implements DHH's requirement to ensure wlan0 and ethernet interfaces
respect the DNS configuration while excluding docker/loop interfaces.

When using Cloudflare or Custom DNS:
- Sets UseDNS=no in DHCPv4 sections
- Sets UseDNS=no in IPv6AcceptRA sections
- Only configures primary interfaces (en*, eth*, wl*)
- Restarts both systemd-networkd and systemd-resolved

When using DHCP:
- Removes UseDNS=no to allow DHCP provided DNS
- Restores default behavior for all interfaces

Script size increased from 58 to 89 lines to properly handle all
network interfaces as requested.
OmarSkalli pushed a commit to OmarSkalli/omarchy that referenced this pull request Aug 26, 2025
Replace Google DNS fallback with Quad9 (9.9.9.9, 149.112.112.112)
for better privacy consistency. Users choosing Cloudflare likely
value privacy, so Quad9 is a more appropriate fallback than Google.

As discussed in omacom#752 and approved by @dhh in omacom#1043.
jakeprime pushed a commit to jakeprime/omarchy that referenced this pull request Aug 26, 2025
Implements DHH's requirement to ensure wlan0 and ethernet interfaces
respect the DNS configuration while excluding docker/loop interfaces.

When using Cloudflare or Custom DNS:
- Sets UseDNS=no in DHCPv4 sections
- Sets UseDNS=no in IPv6AcceptRA sections
- Only configures primary interfaces (en*, eth*, wl*)
- Restarts both systemd-networkd and systemd-resolved

When using DHCP:
- Removes UseDNS=no to allow DHCP provided DNS
- Restores default behavior for all interfaces

Script size increased from 58 to 89 lines to properly handle all
network interfaces as requested.
jakeprime pushed a commit to jakeprime/omarchy that referenced this pull request Aug 26, 2025
Replace Google DNS fallback with Quad9 (9.9.9.9, 149.112.112.112)
for better privacy consistency. Users choosing Cloudflare likely
value privacy, so Quad9 is a more appropriate fallback than Google.

As discussed in omacom#752 and approved by @dhh in omacom#1043.
gocs pushed a commit to gocs/omarchy that referenced this pull request Aug 28, 2025
Implements DHH's requirement to ensure wlan0 and ethernet interfaces
respect the DNS configuration while excluding docker/loop interfaces.

When using Cloudflare or Custom DNS:
- Sets UseDNS=no in DHCPv4 sections
- Sets UseDNS=no in IPv6AcceptRA sections
- Only configures primary interfaces (en*, eth*, wl*)
- Restarts both systemd-networkd and systemd-resolved

When using DHCP:
- Removes UseDNS=no to allow DHCP provided DNS
- Restores default behavior for all interfaces

Script size increased from 58 to 89 lines to properly handle all
network interfaces as requested.
gocs pushed a commit to gocs/omarchy that referenced this pull request Aug 28, 2025
Replace Google DNS fallback with Quad9 (9.9.9.9, 149.112.112.112)
for better privacy consistency. Users choosing Cloudflare likely
value privacy, so Quad9 is a more appropriate fallback than Google.

As discussed in omacom#752 and approved by @dhh in omacom#1043.
@jardahrazdera
jardahrazdera deleted the network-dns-config branch September 9, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants