Manage your dns using nmcli

Fri, 15 Sep 2023

I use pi-hole to block my ads and as a recursive dns server. I would like to take full advantage by keeping my pihole the only dns address.

# Set your DNS
nmcli con mod $connection ipv4.dns "your-dns-server"
# Ignore auto-dns
nmcli con mod $connection ipv4.ignore-auto-dns yes