Custom DNS with DHCP

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
DragoSpiro98
Posts: 1
Joined: Sun Nov 21, 2021 11:46 am

Custom DNS with DHCP

Post by DragoSpiro98 »

Hi y'all, I need your help. I have to change the DNS but maintaining a dynamic IP (because at the moment I use an android hotspot as router). On Windows I can change the DNS without setting a static ip, how can I do it on Dietpi? Thanks in advance
User avatar
trendy
Posts: 389
Joined: Tue Feb 25, 2020 2:54 pm

Re: Custom DNS with DHCP

Post by trendy »

I am not certain if you can do it from dietpi-config.
However you could try to add

Code: Select all

dns-nameservers 8.8.8.8 8.8.4.4
in /etc/network/interfaces under the interface.
Or you can try to add the

Code: Select all

nameserver 8.8.8.8
in /etc/resolvconf/resolv.conf.d/head
Post Reply