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

Feature Request: dnscrypt plugin support for squid transparent proxy #1014

Closed
opnsenseuser opened this issue Nov 23, 2018 · 33 comments
Closed
Assignees
Labels
feature Adding new functionality

Comments

@opnsenseuser
Copy link
Member

@mimugmail the Tool is one of my favorits. Works Great and easy to use.
But would be Great if you could manage this Plugin working with transparent proxy (Squid)
Regards rene

@mimugmail
Copy link
Member

As I said in the forums ... I'm thinking (could take some time) :)

@opnsenseuser
Copy link
Member Author

No Problem. This Plugin is really really great 👍

@mimugmail
Copy link
Member

ok, it might be the problem of your local DNS servers
Go to System : Settings : General ... remove all dns servers (make backup before) and only use your LAN IP pointing at the NAT port forward you set. Then it reaches port 5353

@opnsenseuser
Copy link
Member Author

opnsenseuser commented Nov 24, 2018

Problem is, that i cant do this because some other Clients on another lan Interface (wlan Clients iPad/iPhone) need the dns Servers. They dont use this Plugin, because some Apps like Facebook and Banking Sites do not work with the dnscrypt Plugin. :-(

@mimugmail
Copy link
Member

Why shouldnt they work? Then add the domain to forward and set 9.9.9.9 or whatever :)

@opnsenseuser
Copy link
Member Author

opnsenseuser commented Nov 24, 2018

i removed all dns servers, saved the settings and made a unbound service restart.
then i made a ipconfig /flushdns an my windows client machine.

result -> no difference . same problem! :-(

@opnsenseuser
Copy link
Member Author

by the way....sometimes there is a huge latency when i open websites!

@mimugmail
Copy link
Member

I set up transparent proxy at home, will test this evening ..

@opnsenseuser
Copy link
Member Author

👍

@opnsenseuser
Copy link
Member Author

@fichtner can You assign the issue to mimugmail? I do not have the right. Thx, regards rene

@mimugmail
Copy link
Member

With the next version you can run this plugin on port 53, so you can disable unbound and set localhost as the system resolver to let squid use it.

@opnsenseuser
Copy link
Member Author

@mimugmail that are really great news..i will Test this. well done 👍

@mimugmail
Copy link
Member

@opnsenseuser can you test please and close if it fits your need? :)

@opnsenseuser
Copy link
Member Author

@mimugmail not all my clients should go by dnscrypt proxy. some should use only unbound!.
Is this also possible with this solution ?
And is there a howto for this plugin avaiable?

thx for your support! rené

@mimugmail
Copy link
Member

With transparent proxy this isnt possible as only the proxy does DNS requests.

In docs repo is an open PR with a little documentation (also from a guy in the forums)

@opnsenseuser
Copy link
Member Author

@mimugmail thx very much.
I have clients that do not use a transparent proxy. For these clients, would it still be possible to use unbound instead of dnscrypt?

@opnsenseuser
Copy link
Member Author

With transparent proxy this isnt possible as only the proxy does DNS requests.

In docs repo is an open PR with a little documentation (also from a guy in the forums)

where can i find the doc repo´s ?

@fabianfrz
Copy link
Member

@fichtner fichtner added the feature Adding new functionality label Dec 15, 2018
@mimugmail
Copy link
Member

@opnsenseuser it heavily depends how you use it. You can run Unbound on any interface port 53, then you add a second loopback IP via Firewall : Virtual IPs : Alias, bind dnscrypt-proxy to it and set it as the system DNS (for transparent proxy). Then all your clients use Unbound and system dnscrypt. Now you can start using NAT rules for the clients that should use dnscrypt to your loopback IP

@fabianfrz
Copy link
Member

@mimugmail FYI (you may add a custom DNS server in the squid config): http://www.squid-cache.org/Doc/config/dns_nameservers/

@opnsenseuser
Copy link
Member Author

@mimugmail i changed all the setting you said. i made a virtual ip. made a nat rule to this ip. changed the alternative server in the transparent proxy setting to the virtual ip. changed dnscrypt ip to the virtual ip. but i get the same error if i tried to nslookup 192.168.1.1 (my router) -> see my screenshot

grafik

@opnsenseuser
Copy link
Member Author

thats my "nat-rule" with the virtual ip
grafik

that is the firewall rule for the interface:
grafik

these are the dnscrypt service settings:
grafik

these are the transparent proxy settings:
grafik

i do not know if i need this rule anymore?

grafik

@mimugmail
@fabianfrz can you help me with these settings? did i miss something?

@fabianfrz
Copy link
Member

I am not involved in any of this settings, so I'm out here (I have not developed nor used any of this settings).

@opnsenseuser
Copy link
Member Author

@mimugmail any news on this?

@mimugmail
Copy link
Member

@opnsenseuser you didn't bind dnsproxy to port 53, then it wont work ...

@opnsenseuser
Copy link
Member Author

@mimugmail where do i have to configure this? Can you help me? Regards rene

@mimugmail
Copy link
Member

dnscrypt proxy, general, listen address 192.168.1.100:53 and set allow privileged ports ..

@opnsenseuser
Copy link
Member Author

And localhost [::1]:53 too ?

@mimugmail
Copy link
Member

No, just this IP and then set dns for squid for this IP
The clients which should use Unbound will stick to FW LAN IP port 53 ...

@opnsenseuser
Copy link
Member Author

Ok, and the nat rule i Posten above. Fortward 53 to 5353. is this correct?

@mimugmail
Copy link
Member

you told me that only some users need this rule, or other just have to use unbound. the nat rule is only to force dnscrypt for specific clients. you have to decide for which users it should be set.

@opnsenseuser
Copy link
Member Author

Yes, i made a nat rule for Squid Proxy accecpt the noproxy Clients.

@mimugmail
Copy link
Member

So, can you close this? Otherwise this would more fit for the forums as dnscrypt is feature complete (besides blacklists)

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

4 participants