# Pi-Hole & Resolv.conf:  Bad Nameserver

**URL:** https://dietpi.com/forum/t/pi-hole-resolv-conf-bad-nameserver/4364
**Category:** Troubleshooting
**Created:** [11 August 2020 03:03 UTC](https://dietpi.com/forum/t/pi-hole-resolv-conf-bad-nameserver/4364 "2020-08-11T03:03:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![salieri](https://dietpi.com/forum/user_avatar/dietpi.com/salieri/32/2954_2.png) [@salieri](https://dietpi.com/forum/u/salieri)
#### Post date: [11 August 2020 03:03 UTC](https://dietpi.com/forum/t/pi-hole-resolv-conf-bad-nameserver/4364/1 "2020-08-11T03:03:24Z")

</div>

**Environment:**

OS = DietPi v6.31.2  
Pi-Hole Version = 5.1.1

**Error:**

I have been running Pi-hole for the past month, and as of yesterday, I have a problem.

From the command line, I did a pihole -g and get the error “DNS resolution is currently unavailable”

**Troubleshooting:**

After searching on the forums, it looks like it has to do with /etc/resolv.conf

There’s a SINGLE line that says nameserver 192.168.1.1 (which references my router).

I know if I change it to 127.0.0.1 and save it works fine.

**Help Needed:**

The problem is when I REBOOT, the nameserver reverts BACK to 192.168.1.1. How do I fix this so it always stays to 127.0.0.1 ? This used to work FINE until yesterday. Unsure as to what changed…

**Additional Note:** I reached out to Pi-Hole’s support FIRST and they recommended I direct my inquiry over here.

Thank you for any help, it is greatly appreciated!

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [11 August 2020 07:15 UTC](https://dietpi.com/forum/t/pi-hole-resolv-conf-bad-nameserver/4364/2 "2020-08-11T07:15:35Z")

</div>

Hi,

I guess you opened same issue at Github? correct? If yes, pls let’s stay at one place. It doesn’t make sense to open it twice

[https://github.com/MichaIng/DietPi/issues/3710](https://github.com/MichaIng/DietPi/issues/3710)

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [11 August 2020 12:24 UTC](https://dietpi.com/forum/t/pi-hole-resolv-conf-bad-nameserver/4364/3 "2020-08-11T12:24:46Z")

</div>

solved by setting correct DNS value on dietpi-config.
