Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns/dnscrypt-proxy: allow dns server port #1104

Closed
thutex opened this issue Dec 12, 2018 · 15 comments
Closed

dns/dnscrypt-proxy: allow dns server port #1104

thutex opened this issue Dec 12, 2018 · 15 comments
Assignees
Labels
feature Adding new functionality

Comments

@thutex
Copy link
Contributor

thutex commented Dec 12, 2018

We now have the dnscrypt proxy. great.
However, when setting it up i was trying to have this situation:

  • clients query the firewalls local dns server (for local domains and filtering etc etc, port 53)
  • if the firewall needs to resolve the query, it should use the dnscrypt server (localhost port 5353)

however in system/general/settings under networking - where we enter the general dns servers to use - we cannot specify the port.
this means i cannot have dnscrypt running on port 5353 and have the firewall use this proxy to resolve queries.

@mimugmail
Copy link
Member

Yep, you need to run it on port 53, thats why I added the checkbox for higher privileges.

@fichtner
Copy link
Member

The system servers are for resolv.conf, which does not support any other port than 53. The way this is supposed to work is to create an alias for loopback that is not 127.0.0.1 -- there's all of 127.0.0.0/8 to choose from -- and let dnscrypt-proxy listen on a particular loopback IP on port 53 which can then be added as a system server. But I'm not sure if @mimugmail already has that included.

@mimugmail
Copy link
Member

An IP alias for an unassigned interface? Is this possible?

@thutex
Copy link
Contributor Author

thutex commented Dec 13, 2018

i have dnsmasq running on port 53 for all my vlans, so dnscrypt has to run on another port.
if an ip alias cant work, maybe add an option to dnsmasq (and unbound) ?
i know dnsmasq supports dns servers on other ports with server=127.0.0.1#5353, but there is no option to add the (general) dns servers to use since it are the system ones by default.

@fichtner
Copy link
Member

Loopback is not unassigned ;) You can actually select it from VIPs...

@fichtner
Copy link
Member

fichtner commented Dec 13, 2018

Again, you need to run it on 127.0.0.2:53 or other. It's impossible to move the port to somewhere else.

@mimugmail
Copy link
Member

Oh, I totally overlooked this :/ Maybe because Interface is called Localhost

@fichtner
Copy link
Member

Good point, let me change that...

@thutex
Copy link
Contributor Author

thutex commented Dec 13, 2018

@fichtner : i have the proxy running on 127.0.0.1:5353, point the general dns/resolv.conf to 127.0.0.1, where dnsmasq is listening.
using the advanced options i added server=127.0.0.1#5353 to point to the proxy.

so it is perfectly possible, but the question is if its the best way to do this.
(i like how we dont have to give the proxy any elevated privileges this way)

@mimugmail
Copy link
Member

This is perfectly fine. Some ppl. are concerned about a second resolver involved cause of latency, but sine this is just a local connection it should be minimal ...

I added some stuff for the docs:
https://github.com/opnsense/docs/pull/92/files

@thutex
Copy link
Contributor Author

thutex commented Dec 13, 2018

@mimugmail maybe also add an option to set the static sources instead of the public lists?
great work btw :)

@mimugmail
Copy link
Member

I have to think about this.

In general I don't like the idea because when provider blocks the host or port you're out. It's also prone to user errors leading to more tickets (and work) :)

For now we'll stick with the file, but if more users complaining I'm the last one stopping progress :)

@fichtner
Copy link
Member

@thutex right, for chaining that is correct in advanced options

fichtner referenced this issue in opnsense/core Dec 16, 2018
@fichtner fichtner transferred this issue from opnsense/core Dec 30, 2018
@fichtner fichtner changed the title allow dns server port dns/dnscrypt-proxy: allow dns server port Dec 30, 2018
@fichtner fichtner added the feature Adding new functionality label Dec 30, 2018
@mimugmail
Copy link
Member

This can be closed as 1.1 supports static Servers?

@fichtner
Copy link
Member

Perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding new functionality
Development

No branches or pull requests

3 participants