I'm using Unbound as a resolver, and I'm curious if there's a way to block all HTTP traffic with it; in 2021, every website that doesn't use HTTPS is garbage.
Prajwal
I'm using Unbound as a resolver, and I'm curious if there's a way to block all HTTP traffic with it; in 2021, every website that doesn't use HTTPS is garbage.
Prajwal
The answer is: no. A DNS resolver cannot block traffic. It can only resolve DNS queries.
Assuming the goal is to block your browser from accessing web content without an SSL certificate, you can do this with FireFox by setting HTTPS-Only mode.
In FireFox, go to settings and scroll right to the bottom. You'll see an option to enable HTTPS-Only mode:
This will try to upgrade insecure connections to a site and, if the visiting site does not support HTTPS, a message will be shown letting you know (better than a blank page) that there is no SSL certificate. You can read more about FireFox's implementation of HTTPS-only mode via their documentation.
Chromium-based browsers, as far as I can tell, do not yet have any feature like this.
Of course, if you really want to block all HTTP traffic, you can do this:
sudo ufw deny out 80
This will break all sorts of things almost immediately, but you'll have your wish: zero requests will leave your computer over HTTP.