# Manual DNS working on and off?

**URL:** https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754
**Category:** Help
**Created:** [January 3, 2019, 4:53pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754 "2019-01-03T16:53:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 3, 2019, 4:53pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/1 "2019-01-03T16:53:25Z")

</div>

Hi - having an issue where manual created DNS entries appear to work for 5 mins, then receive my public IP for 5 mins, and on and on...

## Expected Behaviour:

Manual DNS entries created by using these instructions:

> [@HOWTO: Using pi-hole as LAN DNS server](https://discourse.pi-hole.net/t/howto-using-pi-hole-as-lan-dns-server/533):
>
> Admin Edit: This Guide is now outdated, you can make use of the built in "Local DNS Records" feature on the web admin panel play_button Original post contained within this expander.

Should work as expected, all clients on the LAN can resolve DNS enquiries to static machines.

## Actual Behaviour:

Looking in the logs of various machines on the network i see results like this: (IP addresses anonymized)

```
[2019-01-03 07:10:06] NOTICE[2020] dnsmgr.c: dnssrv: host 'my.domain.com' changed from 162.139.14.2:0 to 192.168.0.10:0
[2019-01-03 07:10:06] NOTICE[2020] dnsmgr.c: dnssrv: host 'my.domain.com' changed from 162.139.14.2:0 to 192.168.0.10:0

```

And then 5 mins later back to:

```
[2019-01-03 07:10:06] NOTICE[2020] dnsmgr.c: dnssrv: host 'my.domain.com' changed from 192.168.0.10:0 to 162.139.14.2:0
[2019-01-03 07:10:06] NOTICE[2020] dnsmgr.c: dnssrv: host 'my.domain.com' changed from 192.168.0.10:0 to 162.139.14.2:0

```

And so on, flip-flopping between DNS requests getting the correct static address, then getting my public IP address.

Thanks for any help

---

<div class="post-metadata">

### Author: ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)
#### Post date: [January 3, 2019, 4:59pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/2 "2019-01-03T16:59:24Z")

</div>

Please upload a debug log and post the token here.

---

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 3, 2019, 6:34pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/3 "2019-01-03T18:34:32Z")

</div>

Thanks - debug token is: ia71gj6ewq

---

<div class="post-metadata">

### Author: ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)
#### Post date: [January 3, 2019, 7:38pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/4 "2019-01-03T19:38:15Z")

</div>

Your debug log looks normal.

What was the original purpose of setting the manual DNS entries using that guide?

Is the problem you are seeing a recent problem (since you set up using the guide); or did you set it up per the guide, it worked well and then later developed a problem?

---

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 3, 2019, 10:55pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/5 "2019-01-03T22:55:10Z")

</div>

The original purpose is that i have some machines on the network that require split-horizon dns resolution (for services served both inside and outside the network).

EG server.domain.com is internally resolving to 192.168.0.4 whilst externally server.domain.com is resolving to my public IP.

Setup of pi-hole went smoothly, i then added the manual DNS with that guide and the issue started immediately.

Also on this pi is a ubiquiti controller - this handles all DHCP but DNS servers are handed out manually as the IP address of the pi. Primary DNS is the pi, secondary dns is 1.1.1.1

---

<div class="post-metadata">

### Author: ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)
#### Post date: [January 3, 2019, 11:53pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/7 "2019-01-03T23:53:52Z")

</div>

> [@atcons](#):
>
> Setup of pi-hole went smoothly, i then added the manual DNS with that guide and the issue started immediately.

This is a problem to be solved with your network configuration. We can only give limited help here, as we deal with Pi-Hole issues primarily.

---

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 4, 2019, 5:44am UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/8 "2019-01-04T05:44:01Z")

</div>

Thanks msatter

Yes hairpin would be a good solution - but the reason i am not doing it is that i have some services running on the same subdomain but a different port that i am not opening up to the internet (because i just use it locally) and if i use hairpin it will not be able to connect (as there would be no port-forward)

EG server.mydomain.com is a webserver at port 80 and has a forward rule at the router.

But server.mydomain.com:8443 is a config page for that server and i don't want to open up 8443 to the internet as i only configure locally. With hairpin, 'server.mydomain.com:8443' won't go anywhere as there is no port forward.

Anyway thanks for the suggestion and i will look further into it!

---

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 4, 2019, 5:46am UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/9 "2019-01-04T05:46:07Z")

</div>

> [@jfb](#):
>
> > [@atcons](#):
> >
> > Setup of pi-hole went smoothly, i then added the manual DNS with that guide and the issue started immediately.
> 
> This is a problem to be solved with your network configuration. We can only give limited help here, as we deal with Pi-Hole issues primarily.

Totally understood - i thought the behavior was unusual and as pi-hole is running dnsmasq this would be the right place to ask.

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [January 4, 2019, 9:18pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/10 "2019-01-04T21:18:40Z")

</div>

> [@atcons](#):
>
> i thought the behavior was unusual and as pi-hole is running dnsmasq this would be the right place to ask.

You are right. However, problems that go down so deep into the guts of `dnsmasq` should rather be discussed on the `dnsmasq-discuss` mailing list where the developer of `dnsmasq` (Simon Kelley) can directly respond and provide potential bug fixes.

---

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 4, 2019, 10:10pm UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/11 "2019-01-04T22:10:35Z")

</div>

Great! Thanks for the recommendation DL6ER - i will ask there.

---

<div class="post-metadata">

### Author: ![atcons](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/8e8cbc/32.png) [@atcons](https://discourse.pi-hole.net/u/atcons)
#### Post date: [January 9, 2019, 12:39am UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/12 "2019-01-09T00:39:30Z")

</div>

SOLVED

To follow up in case anyone else is in a similar position.

This was down to my router handing out a secondary DNS server (1.1.1.1). My best guess is that any delay in the pi-hole resolving an address and the query went onto the cloudflare dns.

So in this case, making sure the router was only handing out a primary DNS server (the pi-hole) solved the issue.

---

<div class="post-metadata">

### Author: ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)
#### Post date: [January 30, 2019, 2:09am UTC](https://discourse.pi-hole.net/t/manual-dns-working-on-and-off/15754/14 "2019-01-30T02:09:46Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
