Anyone setup DNSCrypt with PiHole on a RBP?

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
Hi All,

I've been banging my head against the wall for about 2 days here trying to get DNSCrypt and PiHole working together.

I've followed the guide posted here to a T and have gotten absolutely nowhere.

The guide itself seems very straightforward, but when I finish, and use the "./dnscrypt-proxy -resolve [insertwebsitehere]" command, nothing resolves and I can't ping anything.

I've tried a few hours of troubleshooting with a friend of mine, but haven't made any progress at all and don't know enough about the *nix environment or what is happening here to really go any further.

The current state of the machine has PiHole removed (as I was trying to get DNSCrypt to work on its own), but with DNSCrypt not currently able to be run. I'm assuming this is due to having commented out, or uncommented something in one of the config files as I've gone back and forth with these about 500 different times with no luck.

For reference, the error I get is:
" [FATAL] Failed to start DNSCrypt client proxy: "systemctl" failed: exit status 4"

Even when I was not having this error and I had DNSCrypt running, I still was not able to get the full setup to work based on the guide. I was able to get DNSCrypt to resolve correctly using the above command, but as soon as I tried to do anything with PiHole or hook anything into, it stopped working.

Any help or ideas anyone has would be appreciated. I am very determined to get this working, but feel like I'm at a bit of a brick wall because I don't know what else to do/check.

Thanks for reading!
 
Last edited:

ch33zw1z

Lifer
Nov 4, 2004
38,000
18,346
146
How are you doing the remove?

If you enter (I may be wrong on exact syntax here, buy you get the drift)

Sudo systemctl dnscrypt-proxy -status

What's returned?
 
Reactions: Lordhumungus

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
I had to re-start the RBP because I wasn't seeing it connected anywhere and it seems like DNSCrypt is running properly again (I was able to ping and run a resolve with it).

Still not sure how I can get this working with PiHole however as this is as far as I ever get without something failing.

Probably not relevant anymore, but the results for running "sudo systemctl status dnscrypt-proxy" are:

● dnscrypt-proxy.service - Encrypted/authenticated DNS proxy
Loaded: loaded (/etc/systemd/system/dnscrypt-proxy.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2018-05-11 15:18:52 PDT; 1min 41s ago
Process: 1328 ExecStart=/home/pi/dnsproxy/dnscrypt-proxy (code=exited, status=255)
Main PID: 1328 (code=exited, status=255)

May 11 15:18:52 Corpus_Colossus systemd[1]: dnscrypt-proxy.service: main pro...a
May 11 15:18:52 Corpus_Colossus systemd[1]: Unit dnscrypt-proxy.service ente....
Hint: Some lines were ellipsized, use -l to show in full.

Edit: As far as the remove I don't even remember how I did it at this point, that was on like hour 8 of tinkering, so I'm a little foggy.
 

ch33zw1z

Lifer
Nov 4, 2004
38,000
18,346
146
Step 1 leaves much of the specifics out. There's potentially extensive config, but doesn't look too bad for a base config.

An important thing in Unix, or really any OS, any base config file that's working, copy it out before editing.

So start at step 1, take your time...and maybe move the thread to the Linux section to see of you get more help. I haven't setup pihole or dnscrypt-proxy, but did a dns redirect thing a few years ago
 
Reactions: Lordhumungus

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
Thanks for the suggestion. I've done and re-done from scratch many times now, but still no luck.

I'll see about moving the thread though.
 

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
Ok, I completely re-installed the OS and started from scratch. I have a better handle on usage and some do's and don'ts, so this time I made sure to make obvious copies of every file I edited as well as information on what exactly I edited and locations etc.

All of that said, I'm still in the exact same spot with it not working correctly.

One new oddity in the mix is that I went ahead and grabbed the FTLDNS version of PiHole (and verified that it was fully updated etc) in order to be able to use the "Local DNS server on custom port" option in the web admin interface, BUT the option is still not present.

I'm really at a loss on this one. It seems so weird to me that there would be such a simple setup as a Wiki that just straight-up does not work for me.

Thoughts?
 

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
So upon further reflection and reading that status message again after the latest attempt, it looks like the dnscrypt-proxy service won't run.

Anyone have any insights on how I can figure out the cause for that? I do see the exit code 255 message, but I have no idea what that means.
 

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
I'm sorry, not sure exactly what you mean there.

Edit: When in doubt, google it out. I tried man dnscrypt-proxy, but it says there is no manual entry. Not sure if there is some syntax/location/other brand of unknown wizardry I should be using.
 
Last edited:

ch33zw1z

Lifer
Nov 4, 2004
38,000
18,346
146
Can you manually start it? Or just cant get the service to run?

Post the command and output
 

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
If I try to manually start it using "sudo ./dnscrypt-proxy -service start", I get:

[2018-05-14 14:19:07] [NOTICE] Source [public-resolvers.md] loaded
[2018-05-14 14:19:07] [NOTICE] dnscrypt-proxy 2.0.12
[2018-05-14 14:20:12] [NOTICE] Service started

Then, I run "sudo systemctl status dnscrypt-proxy" and get:

● dnscrypt-proxy.service - Encrypted/authenticated DNS proxy
Loaded: loaded (/etc/systemd/system/dnscrypt-proxy.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2018-05-14 14:24:16 PDT; 28s ago
Process: 1829 ExecStart=/opt/dnscrypt-proxy/dnscrypt-proxy (code=exited, status=255)
Main PID: 1829 (code=exited, status=255)

May 14 14:24:16 Corpus_Colossus systemd[1]: dnscrypt-proxy.service: Failed with result 'exit-code'.

On another note, one of the PiHole devs responded to me about the Local DNS option being gone. It's apparently now integrated into any of the custom DNS fields with the syntax (host#port). I'm trying to edit the Wiki page, but for some reason GitHub flagged my account, so I'll do that as soon as I can.
 

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
Ok, so the latest update after a little bit of info on the PiHole Discourse is that I determined something called "avahi-daemon" uses port 5353.

Figured this out by first enabling the most verbose logging level by setting log_level = 0 in the dnscrypt-proxy.toml file.

This then gave me the error "[2018-05-16 12:14:24] [FATAL] listen udp 127.0.0.1:5353: bind: address already in use" in the log, which told me it was in use, but not by what.

I then ran "sudo netstat -tulpen | grep 5353" to figure out what was using the port I needed, which returned avahi-daemon. I then ran "sudo netstat -tulpen" to show all ports in use so I didn't win the fail lottery again when changing the ports.

Port is now changed to 5354 in all required config files (I may change this later, but for now just wanted literally anything that wasn't in use).

Current status is that DNSCrypt is now running and doesn't show any errors in the log, but I still cannot resolve or ping anything.

Latest error message from a ping is "Temporary failure in name resolution".

Seem to be making some kind of progress, but not really sure where to go from here.
 

Lordhumungus

Golden Member
Jan 14, 2007
1,207
33
91
Final update for anyone that finds this, one I switched to the FTDLNS branch of PiHole and figured out how to input custom IP/port #'s in the admin interface, everything now works exactly as expected. I updated the original wiki to reflect the changes to FTLDNS and how to input the custom IP/port #. The next and hopefully final challenge is going to be getting PiVPN working correctly with all this, which so far has also been giving me fits, but we'll get there eventually.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |