Skip to main content

Configure DNS Resolvers

Nine provides three DNS resolvers for servers in our network.

Netplan

Add the DNS resolvers under nameservers.addresses in your Netplan configuration:

/etc/netplan/55-interfaces.yaml
bonds:
bond0:
nameservers:
addresses:
- 217.150.241.5
- 217.150.242.21
- 178.209.45.7
- 2a02:419:1002::5
- 2a02:418:4005::21
- 2a02:418:4004::7
search:
- nine.ch

Before applying the Netplan configuration, test it to ensure there are no syntax errors or network issues:

netplan try

If the test was successful and the configuration hasn't been applied yet using netplan try, apply it now:

netplan apply

For more information, see: man netplan

systemd-resolved

If you're using systemd-resolved, use the following template:

/etc/systemd/resolved.conf
[Resolve]
DNS=178.209.45.7 217.150.242.21 217.150.241.5 2a02:419:1002::5 2a02:418:4005::21 2a02:418:4004::7
LLMNR=no
MulticastDNS=no
Cache=no
DNSStubListener=yes

resolv.conf

Replace your /etc/resolv.conf with the following template:

/etc/resolv.conf
nameserver 217.150.241.5
nameserver 217.150.242.21
nameserver 178.209.45.7
nameserver 2a02:419:1002::5
nameserver 2a02:418:4005::21
nameserver 2a02:418:4004::7