# Https-dns-proxy canary domain persistance

**URL:** <https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967>\
**Category:** Installing and Using OpenWrt\
**Created:** [October 17, 2022, 11:26pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967 "2022-10-17T23:26:13Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 21, 2022, 2:43pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/21 "2022-10-21T14:43:42Z")

</div>

I thought you were trolling me, that's why I said so. Didn't mean to offend you. In general, my problem is more global and the probability of a solution, as I understand it, will not be positive. There is no way to change the provider, so I set the https-dns service to restart every 15 minutes. Restart is long, about 10-15 seconds

---

<div class="post-metadata">

**Author:** ![rhester72](https://forum.openwrt.org/letter_avatar/rhester72/32/6_449c533f586939b6e5f246632a46421f.png) [@rhester72](https://forum.openwrt.org/u/rhester72)\
**Post date:** [October 21, 2022, 5:22pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/22 "2022-10-21T17:22:25Z")

</div>

OK...that's what I was trying to determine is what your definition of "long" is, in terms of absolutes.

Mine takes 13.5 seconds to fully restart, but I've never known it to be shorter.

What's your need to restart it? (And this may be better served in a different thread, as it's utterly unrelated to the canary topic.)

---

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 22, 2022, 12:29pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/23 "2022-10-22T12:29:55Z")

</div>

I don't need to restart it at all, I need it to work fine 🙂  
the openwrt router is connected to another router, and when the wan ip address changes on the first router, then https-dns stops working, that's the whole problem.  
wan The IP address is provided by the ISP and may change at any time. For example, if you restart the first router, then the IP address will change which is issued by the provider.  
and so on ad infinitum.  
at the moment of changing the IP address that the provider issues, https-dns-proxy stops working at all, until you restart this service or restart the router.  
in general, the Internet stops working, since https-dns-proxy does not work.  
in theory, https-dns-proxy should be bound to the LAN gateway, but based on the fact that it stops working, I assumed that it is bound to the IP address that the provider issues on the first router. After changing the ip address on the first router that the provider issues, https-dns-proxy continues to use the old ip address that no longer exists. This is my guess, but this is how I see the picture.  
and the joke is that in the network settings - br-lan, the lan gateway cannot be changed, it lives its own life 🙂  
I have been struggling with this problem for 2 years, as soon as I started to master openwrt I continue to struggle, but the result is zero. If the developers themselves do not know how to solve this problem, then I definitely will never solve it myself, this is called walking in a vicious circle.

If you remove https-dns-proxy, then everything works fine, but I like this program, I don’t want to remove it.  
without https-dns-proxy the whole point of the openwrt firmware is lost for me

---

<div class="post-metadata">

**Author:** ![rhester72](https://forum.openwrt.org/letter_avatar/rhester72/32/6_449c533f586939b6e5f246632a46421f.png) [@rhester72](https://forum.openwrt.org/u/rhester72)\
**Post date:** [October 22, 2022, 3:43pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/24 "2022-10-22T15:43:55Z")

</div>

Well, you have a few choices, I guess.

https-dns-proxy is far from the only one out there, it just happens to be the easiest to set up and get working out of the box. If you're comfortable with CLI and config file editing, there's cloudflared and dnscrypt-proxy2, both of which are available in OpenWRT and both of which I've had working in the past. Things like forcing DNS requests through them and canary domains is also possible with clever firewall and dnsmasq rules, just like https-dns-proxy.

Second, you can run any DoH/DoT proxy you like on something other than OpenWRT and just point your clients at that, though being double-NATted, it's not likely to work any better than running directly on the router if that is indeed the reason things are failing.

Next, you might want to work with your ISP to understand why they are dropping your lease and changing your IP address so regularly. That is NOT normal under general operation, the lease should only fail to renew and provide a different IP if you are disconnected for a considerable period of time.

Finally, unless there's some obstacle preventing it, I'd strongly advise NOT doing double NAT, putting the upstream router in bridge mode and letting OpenWRT act as the primary/edge router. It prevents a LOT of issues (like double NAT, having to maintain two sets of firewalls for the same thing, broken connections like you're experiencing, reduced throughput and higher latency, etc.) and is generally the recommended way to go.

---

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 23, 2022, 1:30pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/25 "2022-10-23T13:30:21Z")

</div>

dnscrypt-proxy2 weighs too much.  
luci-app-https-dns-proxy this is the only option.

---

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 24, 2022, 3:03pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/26 "2022-10-24T15:03:46Z")

</div>

I noticed that if log is disabled, then https-dns-proxy stops working.

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [October 26, 2022, 4:22am UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/27 "2022-10-26T04:22:50Z")

</div>

Please do not post your issues/questions in the threads started to address other peoples' specific issue/question.

Also, in the future/other threads please be as detailed in your posts as possible. When I asked you to elaborate on your specific setup, you've replied with "yes". The earlier post also misses critical information for anyone who may want to help you. Generally speaking, you need to describe the steps you take, detailing what/how/and where you did at each step, what you expected to happen and what actually happened (as in -- output in the console, messages in the log, etc.).

---

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 26, 2022, 10:18am UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/28 "2022-10-26T10:18:01Z")

</div>

I got it, sorry if it's wrong.

Please tell me how to change Optional polling interval of DNS servers ?  
I would like to disable it altogether or set at least 3600,  
But it would be better to disable it altogether,  
it constantly keeps a connection on port 53, in fact, without breaking the connection at all.

Is it possible to add additional manual adjustment settings to the program? So that everyone can customize as he wants.

---

<div class="post-metadata">

**Author:** ![rhester72](https://forum.openwrt.org/letter_avatar/rhester72/32/6_449c533f586939b6e5f246632a46421f.png) [@rhester72](https://forum.openwrt.org/u/rhester72)\
**Post date:** [October 26, 2022, 1:46pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/29 "2022-10-26T13:46:54Z")

</div>

I'm not quite sure what you're referring to by 'polling interval'.

Standard DNS uses UDP packets for request and response, and the connection is (obviously) not persistent.

DoH uses a persistent TCP connection for speed of response, otherwise a new SSL connection would need to be established with handshake on every individual DNS request, which would be FAR too costly to be practical and result in EXTREMELY high DNS response latency.

---

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 26, 2022, 2:48pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/30 "2022-10-26T14:48:48Z")

</div>

I used to use Simple DNSCrypt on my computer and watched how the program works and all requests go through https,  
there were no regular regular udp packets on port 53 and everything worked very quickly, I think you can probably configure it here too

---

<div class="post-metadata">

**Author:** ![rhester72](https://forum.openwrt.org/letter_avatar/rhester72/32/6_449c533f586939b6e5f246632a46421f.png) [@rhester72](https://forum.openwrt.org/u/rhester72)\
**Post date:** [October 26, 2022, 3:03pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/31 "2022-10-26T15:03:58Z")

</div>

That's not what I'm talking about - DNSCrypt persists its connection just like https-dns-proxy, and for the same reason - otherwise latency would make it practically unusable.

---

<div class="post-metadata">

**Author:** ![fkl7834456](https://forum.openwrt.org/letter_avatar/fkl7834456/32/6_449c533f586939b6e5f246632a46421f.png) [@fkl7834456](https://forum.openwrt.org/u/fkl7834456)\
**Post date:** [October 28, 2022, 10:06am UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/32 "2022-10-28T10:06:02Z")

</div>

Perhaps I don’t fully understand how it works, but pull at least the doh servers out of it, there are at least twice as many of them

---

<div class="post-metadata">

**Author:** ![rhester72](https://forum.openwrt.org/letter_avatar/rhester72/32/6_449c533f586939b6e5f246632a46421f.png) [@rhester72](https://forum.openwrt.org/u/rhester72)\
**Post date:** [October 28, 2022, 2:22pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/33 "2022-10-28T14:22:45Z")

</div>

You can disable or change any of the services that you like via LuCI or /etc/config/https-dns-proxy. I'm truly lost now as to what exactly you want or are trying to achieve.

---

<div class="post-metadata">

**Author:** ![account4538](https://forum.openwrt.org/user_avatar/forum.openwrt.org/account4538/32/66703_2.png) [@account4538](https://forum.openwrt.org/u/account4538)\
**Post date:** [October 28, 2022, 3:07pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/34 "2022-10-28T15:07:58Z")

</div>

Hi,

In `/etc/config/https-dns-proxy` under `config https-dns-proxy` put in:

`option polling_interval '3600'`

3600 is currently the hardcoded maximum allowed. I too think the default 2 min polling interval is too short. It re-establishes the connection every 2 minutes which is an unneeded latency and CPU cycle cost.

---

<div class="post-metadata">

**Author:** ![rhester72](https://forum.openwrt.org/letter_avatar/rhester72/32/6_449c533f586939b6e5f246632a46421f.png) [@rhester72](https://forum.openwrt.org/u/rhester72)\
**Post date:** [October 28, 2022, 3:25pm UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/35 "2022-10-28T15:25:41Z")

</div>

That's also the key refresh cycle. The longer you make it, the more likely your connection is to be able to be compromised, which rather negates the point of DoH in the first place.

Given one of the guy's problems is that he's double-NATted and https-dns-proxy is gloriously unawares when his upstream connection is broken by his ISP constantly switching public IPs on him, increasing the polling interval is only going to make (his) bad problem worse.

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [October 29, 2022, 12:35am UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/36 "2022-10-29T00:35:31Z")

</div>

I'm pretty sure the `polling_interval` is needed to be set for each instance, not in the config section.

---

<div class="post-metadata">

**Author:** ![account4538](https://forum.openwrt.org/user_avatar/forum.openwrt.org/account4538/32/66703_2.png) [@account4538](https://forum.openwrt.org/u/account4538)\
**Post date:** [October 29, 2022, 12:40am UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/37 "2022-10-29T00:40:40Z")

</div>

It does nothing in `config main 'config'`

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [November 8, 2022, 12:41am UTC](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967/38 "2022-11-08T00:41:30Z")

</div>

Closed on November 8, 2022, 12:41am UTC

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

[Previous page](https://forum.openwrt.org/t/https-dns-proxy-canary-domain-persistance/139967.md?page=1)
