-
Notifications
You must be signed in to change notification settings - Fork 60
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
Unbound doesn't work with DNScrypt-proxy (ssl handshake failed crypto error) #78
Comments
hey @lbrooney sorry for late reply . I see you using diet pi , did you check to see anything service in diet pi is using port 5335 ???
Disable package:
Also you would need to follow this from readme Important If using DietPi or other OS that do not auto insert nameserver 127.0.0.1 in resolv.conf(to check - sudo nano /etc/resolv.conf) and want to query cache on local hosts, just install resolvconf package and restart unbound-resolvconf.service which should be automatically set:
Run ping -c 3 google.com to confirm localhost is reachable to internet. If not, set/add your default network's dns/gateway or whatever was the default🔗click here🔗 Confirm 127.0.0.1 address interface is up:
More Optional Info DietPi is a lightweight system optimized for low-resource devices like the Raspberry Pi, and it makes some system-wide adjustments that can affect networking, services, or packages. Here are possible areas in DietPi that could be causing the issue and suggestions for adjustments:1. Firewall (IPTables) or DNS Redirection SettingsDietPi may have different firewall rules or DNS redirection mechanisms compared to a standard Raspberry Pi OS. These could interfere with how Unbound or DNScrypt-proxy communicates over specific ports (5335 for Unbound, 6053 for DNScrypt-proxy). Solution: Check and adjust firewall rules Verify that the necessary ports (5335 for Unbound and 6053 for DNScrypt-proxy) are open. sudo iptables -L If the ports are blocked, you can open them by adding rules like: sudo iptables -A INPUT -p tcp --dport 5335 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6053 -j ACCEPT If using ufw, ensure the necessary ports are allowed: sudo ufw allow 5335/tcp
sudo ufw allow 6053/tcp 2. Networking StackDietPi has a different set of optimizations for networking performance, including how DNS and network interfaces are managed. It might have changes that interfere with how Unbound or DNScrypt-proxy handle DNS requests, especially when using loopback addresses like 127.0.0.1 or ::1. Solution: Check and adjust networking settings Check the network stack for issues. Run the following command to ensure the loopback interface is correctly set up: ifconfig lo Make sure the loopback interface is active. If not, activate it: sudo ifconfig lo up Also, DietPi might be using systemd-resolved or dnsmasq for DNS caching. Ensure there’s no conflict between these services and Unbound/DNScrypt-proxy. To check DNS services: sudo systemctl status systemd-resolved
sudo systemctl status dnsmasq If one of these is running and you don’t need it, you can disable it: sudo systemctl disable dnsmasq
sudo systemctl stop dnsmasq 3. DietPi OptimizationsDietPi may apply system-wide optimizations during installation or setup that alter how services like Unbound or DNScrypt-proxy work. Some of these optimizations might involve energy-saving measures or service reductions that cause networking issues. Solution: Disable or adjust DietPi optimizations Check the system optimizations by running: sudo dietpi-config Go to "Performance Options" and ensure no aggressive power-saving measures or CPU throttling are enabled that might affect network performance. |
I also had this problem with Unbound + DNScrypt-proxy on an Adguard LXC (Debian 12) in Proxmox. Tried debugging the issue for a couple of hours but gave up and also ended up removing |
hmm its been a while I used Adguard Home. Interface UI and settings etc maybe changed a lot. Like what i told someone a while ago Github issues will be dead soon. Just use AI @havardthom ask just ask anything and copy and paste code etc and get results 1000x faster and better. I like Claude AI and ChatGPT. 🙏 |
Operating System
DietPi
Architecture
64-bit
Platform
Linux
Project
Unbound, DNScrypt
Browser
Firefox, Chrome, Other
Issue
Other (explain in description)
Issue Description
I believe I'm having the same issue as #59, but I didn't want to necro.
Both Unbound and DNScrypt-proxy are running on the same Pi. Unbound is running on port
5335
, DNScrypt-proxy on6053
. If Idig google.com @127.0.0.1 -p 6053
Google resolves to an IP.If I attempt to
dig google.com @127.0.0.1 -p 5335
with the config below, I don't get an answer. I just trimmed it to what I believe is relevant. Only DNScrypt'sforward-addr
s are uncommented.Checking the logs with
verbosity
at 1, I get a lot of:If I set
forward-tls-upstream
tono
,dig google.com @127.0.0.1 -p 5335
now resolves.So what I suspect is that when
forward-tls-upstream
isyes
, Unbound is correctly attempting to DoT to DNScrypt-proxy, but DNScrypt-proxy only works with regular DNS requests, giving us thessl handshake failed crypto
. I don't believe there is way to make it so Unbound does not attempt this for a singleforward-addr
, only at aforward-zone
level and I think you can only have one"."
forward-zone. Unbound correctly resolves domains when configured with the otherforward-addr
s (I can't speak for Stubby).I am not intimately familiar with these technologies so I admit I could be entirely wrong about this. If I'm not, then Unbound and DNScrypt config section needs to be updated. Also if DNScrypt would then not be accessed only by Unbound, then probably best to enable DNScrypt's caching. Or maybe keep caching disabled and also disable Unbound and have Adguard Home/Pi-Hole handle caching.
If Unbound can make DoH requests then maybe you can setup DNScrypt to accept DoH requests and then still have DNScrypt handle the related. I believe you can make Unbound accept DoH requests, but I don't know if it can make DoH requests itself.
Thanks!
The text was updated successfully, but these errors were encountered: