Allow to set custom ports for upstream dns servers

dns
v7

(Daniel ivanov) #1

NethServer Version: NethServer release 7.5.1804 (final)
Module: DNS(dnsmasq)

Hi. I’ve encountered a problem with configuring my server’s DNS. I’ve installed dnscrypt-proxy and registered it on localhost on a custom port as to not interfere with dnsmasq and tried to add it to the list of upstream DNS servers in GUI. But only “valid” IP addresses are allowed there, while it’s possible to set custom ports in the dnsmasq config like server=1.2.3.4#56987 where numbers after # are the port.
I’m aware of the template-custom method to persist custom configuration files edits, but I think it would be appropriate to allow setting custom ports in the web frontend for use cases like mine.

TL;DR
Installed dnscrypt-proxy to listen on custom port on localhost
Cannot set port for upstream dns for dnsmasq in web frontend
Would like to do so, without template-custom.

Cheers.


(Filippo Carletti) #2

I don’t think that accepting dnsmasq custom syntax in the dns ip address field is a good choice (we could change dns forwarder in the future).
Apart from custom templates, we could add an option to forward dns requests to localhost, with a custom port.
But, maybe, we could create a nethserver-dnscrypt-proxy rpm package that does all under the hood.


(Daniel ivanov) #3

Not necessarily custom dnsmasq syntax, but at least custom port field.

This is also a good idea, but less integrated with the neth ecosystem, I think.

This seems like a most sensible solution, but very narrow at that. What if I’d like to use pi-hole and dnscrypt-proxy as its upstream, for example?

I get that it’s a pretty niche problem, but I think allowing just a custom port in upstream dns config(regardless of the forwarder, as most of them allow it in some way) would be the most flexible solution.
But I might be wrong.