I am having a hard time finding instructions for changing the dns provider for my droplet. It is connected to an internal network over wireshark and want to use that network’s dns servers to resolve names instead of the digital ocean 67.207.67.3 and 67.207.67.2 so I can access internal services. All I can find is for Ubuntu 20 or earlier, none of which are consistent or seem to be workingon my Ubuntu 24.04/4 LTS server.
Side note, will doing so interfere with connecting with Digital Ocean services like my hosted posgres database?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Heya,
On Ubuntu 24.04, DNS is managed by systemd-resolved. To change your DNS servers, edit /etc/systemd/resolved.conf:
[Resolve]
DNS=<your-internal-dns-ip>
FallbackDNS=67.207.67.2 67.207.67.3
Then restart the service:
sudo systemctl restart systemd-resolved
You can verify with resolvectl status to confirm it picked up the new servers.
Your managed Postgres connection string uses a hostname that resolves publicly, so as long as your internal DNS can resolve external domains (or you keep the DO nameservers as fallback like above), it should be fine. If your internal DNS only resolves internal names and nothing else, that’s where you’d run into issues.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.