@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?
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.