I am trying to force my ubuntu 22.04 systems to use google's internal dns resolvers for all queries, but seem to have a disconnect somewhere. I have changed /etc/resolv.conf to:
nameserver 169.254.169.254search google.internal
Inside of google cloud I have setup an internal dns zone for internal.gce which works when I use dig on the same host:
# dig proxy.internal.gce; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> proxy.internal.gce;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46978;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 512;; QUESTION SECTION:;proxy.internal.gce. IN A;; ANSWER SECTION:proxy.internal.gce. 300 IN A 10.10.1.3;; Query time: 4 msec;; SERVER: 169.254.169.254#53(169.254.169.254) (UDP);; WHEN: Tue Feb 20 21:30:37 UTC 2024;; MSG SIZE rcvd: 72
But as soon as I try to do an apt-get update I get the following:
# apt-get updateIgn:1 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy InReleaseIgn:2 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy-updates InReleaseIgn:3 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy-backports InReleaseIgn:4 http://security.ubuntu.com/ubuntu jammy-security InReleaseIgn:5 https://packages.cloud.google.com/apt google-cloud-ops-agent-jammy-2 InReleaseIgn:6 https://esm.ubuntu.com/cis/ubuntu jammy InReleaseIgn:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InReleaseIgn:8 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InReleaseIgn:9 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InReleaseIgn:10 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InReleaseIgn:1 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy InReleaseIgn:4 http://security.ubuntu.com/ubuntu jammy-security InReleaseIgn:5 https://packages.cloud.google.com/apt google-cloud-ops-agent-jammy-2 InReleaseIgn:2 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy-updates InReleaseIgn:3 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy-backports InReleaseIgn:6 https://esm.ubuntu.com/cis/ubuntu jammy InReleaseIgn:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InReleaseIgn:8 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InReleaseIgn:9 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InReleaseIgn:10 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InReleaseIgn:1 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy InReleaseIgn:2 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy-updates InReleaseIgn:4 http://security.ubuntu.com/ubuntu jammy-security InReleaseIgn:5 https://packages.cloud.google.com/apt google-cloud-ops-agent-jammy-2 InReleaseIgn:3 http://us-central1.gce.archive.ubuntu.com/ubuntu jammy-backports InReleaseIgn:6 https://esm.ubuntu.com/cis/ubuntu jammy InReleaseIgn:7 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InReleaseIgn:8 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InReleaseIgn:9 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InReleaseIgn:10 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InReleaseErr:4 http://security.ubuntu.com/ubuntu jammy-security InRelease Temporary failure resolving 'proxy.internal.gce'