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

Portmaster should use its own resolver for own connections. #249

Closed
dhaavi opened this issue Feb 10, 2021 · 2 comments
Closed

Portmaster should use its own resolver for own connections. #249

dhaavi opened this issue Feb 10, 2021 · 2 comments
Labels
bug TYPE: a report on something that isn't working

Comments

@dhaavi
Copy link
Member

dhaavi commented Feb 10, 2021

The firewall is laid out to redirect any "rogue" DNS queries back to the Portmaster. Of course this exempts all requests the Portmaster does itself, as it is also a DNS resolver itself.

But this in turn also affects any connections that the Portmaster does by itself, which are not part of the nameserver. Currently this affects (at least) the following code sections:

response, err := client.Do(request)

ips, err := net.LookupIP(DNSTestDomain)

As well as the updating process, this time in safing/portbase:
https://github.com/safing/portbase/blob/80588d5a537470f471d1055336d0e4162fc53621/updater/fetch.go#L132


Fixing

This can be quite easily fixed on Linux by enabling Resolver.PreferGo and setting a custom Resolver.Dial function. The Resolver.Dial function would then return a bridge that just feeds the request data to the nameserver internally.

Unfortunately, these interfaces are currently ignored on Windows. A go proposal to change this was accepted, but not implemented yet.

@dhaavi dhaavi added the bug TYPE: a report on something that isn't working label Feb 10, 2021
@dhaavi dhaavi changed the title Portmaster should use it's own resolver for own connections. Portmaster should use its own resolver for own connections. Feb 10, 2021
@github-actions
Copy link

That was 10 years ago, I think we can close this now.

@dhaavi
Copy link
Member Author

dhaavi commented Feb 11, 2022

Sorry, issue was closed by misconfigured bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TYPE: a report on something that isn't working
Projects
None yet
Development

No branches or pull requests

2 participants