System-side host manager ad blocker


I’m looking for a gui application that will allow me to manage a host file.
Add some rules fastly for specific ad block list or ignoring some. Depending of each user needs.

I.E : i use the computer i want to block ads, porn, trackers, statistic…
My daughter use the pc i block previous + social media + youtube…

For this i use different list provided by Energized Protection.
A simple ad blocker as ublock is not enought for me.
I’m looking for something for the whole computer.

I’ve found SwitchHosts
Seems to be open source, but of course it ask me my root password to make the necessary changes to the host file. I’m a bit scare to give it. I’m not experienced enough to understand the source code.

What do you think about this app ?
Do you already know/use it ?

It look very usefull and esay to use.

Thanks for advices.


Pi-Hole, might be worth looking into. You can block categories broadly on your network with
OpenDNS and forcing DNS in your network configuration. NextDNS might be another option.

switchhost is available from the AUR, but I recommend the precompiled version, switchhost-bin. :arrow_down:

pamac build switchhost-bin

Alternatively, you could try dansguardian or e2guardian, both also from the AUR… :arrow_down:

pamac build dansguardian
pamac build e2guardian

@jrichard326 Pi-hole is web based if i understand well, does it manage the host file ? i already tried to install it but find it a bit hard to setting up well.

@Aragorn thanks didn’t know that it is in AUR. if its in AUR is this a proof of confidence ?
e2guardian is web based ? it doesn’t manage the host file right ?

I really like the simple use of switchhost, just want to know if it’s secure to give my root.

No, it means that you can easily install it. :wink:

I don’t know ─ I’ve never used it.

If a locally installed application needs the root password, then it’s usually warranted. In this case, if it has to modify /etc/hosts, then it needs root privileges, because that file is writable to root only.

I am not sure if Pi-hole is web based. I believe you pick the host lists and they are downloaded and updated in the software, if that is what you mean by web-based. I run Diversion/UiDivStats on an Asus Router with Merlin firmware and it gets the job done. It is my understanding that it is similar to Pi-hole. I am using one of the Energized lists with a few others and am generally satisfied with my system-wide results. I use uBlock Origin (dev) on my browsers and OpenDNS (free) with custom blocking for the network.

Thank you both for your help.

@Aragorn Yes i understand it is necessary to give my root, no problem with that. Just need to know if its safe in this case.

@jrichard326 Pi-hole is installed as a self hosted app, if i understand it is like an interface between the internet connection and other apps. Not really a system-wide app.

It is probably just as safe as with any other application or system component that asks you for the root password.

You want something that modifies /etc/hosts, and there’s no way around the fact that doing so requires root privileges. :man_shrugging:

There are a number of packages that do this … example : AUR (en) - update-hosts-git

$ wc -l /etc/hosts
285266 /etc/hosts

yes thats 285 thousand entries. :wink:

@cscs mine set from energized protection is around 700K entries between the unified pack and some extras (no duplicates normally).

There are multiple packages, services, sources. It is up to you to choose or configure them.
Some have numbers of lists to add, some are simply locked to MVPS+Someonewhocares…
Another one that curates multiple lists and uses systemd services to update itself is hblock.
(though I never quite got it working right)
So look around … there isnt really much in the regular repos, but at least a handful of different options in the AUR.

Of course I should also leave the documentation for that here as well: