I blocked several domains in my /etc/hosts file a few days ago. So far the only difference with my daily browsing I have noticed is that captchas fail to show up.

I've been getting around that by using for pages that require me to use captchas.

@eludom I actually just set the domains to point to localhost using /etc/hosts

@Zambyte what system are you on? How is resolution set up?

@eludom I'm on NixOS. I just added `networking.extraHosts = ...` in my configuration.nix file. The string you assign that value to basically just gets added to your /etc/hosts file.

By pointing domains that I don't want to connect with to localhost, the service will immediately fail to connect, since I'm not hosting a web server on my machine.

@eludom Btw I just tried to use /etc/hosts.deny; apparently it is only for blocking inbound connections. It wont block connections you try to make to the service.

@robby yeah, /etc/hosts.deny is old school proto firewall based originally on inetd. Not sure if it even works in the deadly embrace of systemd.

@Zambyte This may be unnecessary, but have you considered setting up a Pi Hole DNS server on your network?

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.