internet-pi icon indicating copy to clipboard operation
internet-pi copied to clipboard

Ubuntu uses a managed resolv.conf, we can't just edit it directly

Open lukegiuliani opened this issue 3 years ago • 1 comments

Don't try to update resolv.conf on ubuntu because it's managed by systemd-resolve, and it makes it sad.

To do it properly it requires modifications to the /etc/netplan/xyz.yaml where you have set up the machines config, and we can't assert that without knowing more about the destination model. For example a netplan that looks like this:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: false
      dhcp6: false
      ipv6-privacy: true
      addresses:
        - 192.168.0.5/24 # Update as appropriate. 
      routes:
        - to: default
          via: 192.168.10.1
      nameservers:
          addresses: [127.0.0.1] # update to wherever we want dns to resolve. For pi-hole, probably localhost. 

lukegiuliani avatar Oct 19 '22 06:10 lukegiuliani

I realise this is a different approach than https://github.com/geerlingguy/internet-pi/pull/389. That's also fine, but is more opinionated about how you want your dns to finally respolve. This PR assumes that you are letting pi-hole control the upstream DNS through it's web config.

It also just opts out of core functionality, rather than adding new stuff which I think was part of @geerlingguy 's objection to #389

lukegiuliani avatar Oct 21 '22 02:10 lukegiuliani

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

stale[bot] avatar Apr 02 '23 09:04 stale[bot]

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.

stale[bot] avatar May 21 '23 12:05 stale[bot]