TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.25k stars 418 forks source link

Feature request: return customer configured IP for blocked zones #50

Closed bob-zscharnagk closed 5 years ago

bob-zscharnagk commented 5 years ago

Would it be possible to allow the 0.0.0.0 returned for blocked zones to be configurable? I would like to display a "Blocked" message for the user HTTP requests.

ShreyasZare commented 5 years ago

It may look simple at first thought but is not really feasible to do that.

To show a "Blocked" message or any custom message will need the DNS server to handle the HTTP requests too. It would be still feasible if it was just plain HTTP but, more and more websites are now using HTTPS (thanks to free SSL certificates from Let's Encrypt) and with that its infeasible to do a man-in-the-middle handling of HTTPS request for blocked zones to return the custom message.

It would still work if you can get all your devices to install root certificate provided by the DNS Server but that dramatically increases the complexity for anyone to setup or manage the setup.

So, its not impossible but too difficult to setup and manage to consider having such a feature.

bob-zscharnagk commented 5 years ago

Sorry should have been clearer. If Technitium could return a custom IP address my web server, on that address, could return the required HTML.

ShreyasZare commented 5 years ago

Even if its your web server, how do you plan to return custom HTML for HTTPS websites?

bob-zscharnagk commented 5 years ago

It's a self written web server to handle specific requests so it's quite simple to check for the custom IP address as the target and a LAN IP as the source and return the required HTML.

ShreyasZare commented 5 years ago

It would not work. If the web browser is making HTTPS request then you cannot just return HTML. You do not have SSL certificate for the blocked domain since you don't own it.

ShreyasZare commented 5 years ago

closing feature request since its technically infeasible to implement.