########################################################################################## MISC-27: Build and document a publicly accessible DoH Server ########################################################################################## Issue Type: Task ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Done (2019-05-10 23:27:36) Project: Miscellaneous (MISC) Reported By: btasker Assigned To: btasker Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== It's reasonably obvious from various replies to this tweet (https://twitter.com/bentasker/status/1122088753495969793) that there's an appetite for some documentation on how to set up your own ad-blocking DNS over HTTPS server. So, the aim of this task is to spin up a new publicly accessible one and document the process with a focus on - Blocking ads/trackers by pulling my adblock lists (https://www.bentasker.co.uk/adblock/) - Configuring in such a way that it should be reasonably safe to make publicly available - (Optionally) configuring to make accessible via an Onion name As with my initial attempt, I want to have a DoH handler sat in front of unbound (which will handle the adblock lists, caching and forwarding queries onto an upstream recursor where they cannot be handled locally). I previously used this DoH server - https://github.com/m13253/dns-over-https - to handle the DoH part, and see no reason not to again. The ultimate outcome should be a working server *and* a step-by-step guide on how to build it. A working ansible playbook would be a bonus. However, there is a secondary aspect to this that I'd like to look into (and should, theoretically, be possible): I'd like to look into the possibility of writing some LUA to accept DoH requests, translate them into DNS requests (to Unbound) and then translate the response back into something to be returned to the client. That way, I can potentially deploy a DoH service across the entire edge of my personal (and admittedly small) CDN. I'll raise a subtask for that aspect of it nearer the time, it's definitely not the primary aim, and is simply being noted so that I don't forget. ----------------------------------------------------------------------------------------- Issue Relations ================ - DNS over HTTPS server (https://github.com/m13253/dns-over-https) ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2019-04-27 19:49:23 btasker ----------------------------------------------------------------------------------------- One thing to note (it should be obvious, but just so I remember to explicitly point it out all the same) - although there are various risks involved with making any DNS service publicly available, because DoH requires a TCP connection (which implies a 3-way must be successfully completed before any queries are even submitted, let alone responded to), there isn't the same worry about DNS reflection attacks that there are when making a UDP DNS server available for public use. We do still need to worry about things like our IP's reputation and rate of upstream queries though, so there is still a need for some protection. Plus of course worries about attempts to exploit the software ----------------------------------------------------------------------------------------- 2019-04-27 19:51:54 btasker ----------------------------------------------------------------------------------------- Actually, I don't think there's any particular need for this issue to sit in the STAGING project, it's not likely to contain any sensitive info at any point, so I'm going to move it over to MISC (as that'll be it's ultimate destination anyway). ----------------------------------------------------------------------------------------- 2019-04-27 19:56:45 ----------------------------------------------------------------------------------------- btasker changed Project from 'STAGING' to 'Miscellaneous' ----------------------------------------------------------------------------------------- 2019-04-27 19:56:45 ----------------------------------------------------------------------------------------- btasker changed Key from 'STGNG-8' to 'MISC-27' ----------------------------------------------------------------------------------------- 2019-04-27 23:35:07 git ----------------------------------------------------------------------------------------- -- BEGIN SNIPPET -- ------------------------- From: git@