tl;dr what are all the ways I can block a website on linux? Debian if it’s relevant.

I want to stop myself using certain sites. Since I’m reasonably techy and can work round all blocks I’ve come up with, I’ve found an effective approach is to apply as many hurdles as possible, so that visiting the website takes effort.

So far I’ve added the site to ublock’s block list, and redirected sites via /etc/hosts. What other options are there?

While I have admin access to the router, I’m not allowed to block sites there.

  • D_Air1@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    19 hours ago

    Any of the adblockers can do this. Pihole, adguard home, technitium. Ublock origin to. You can probably do it pretty painstakingly through the hosts file as well.

  • Novi Sad@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    21 hours ago

    Roughly from high level to low level:

    1. uBlock custom filters
    2. Make pages unusable or less attractive by wonky per-site browser or extension settings
    3. IP and DNS blocks on your local machine
    4. Run a DNS proxy on your local machine and block domains with it
    5. Host a pihole server on a different machine, make it your DNS server and block domains there
    6. IP and DNS blocks in your router (if your current one has no option for this, consider buying another, preferably used)

    Best apply the methods arbitrarily, so that you get even more confused about how you might restore access to a given website.

    Options 5 and 6 may be the only viable ones for locking down certain smartphones or tablets.

  • Holytimes@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    Just set the site to be hidden? If it’s not in the list you didn’t even know its an option and thus everything else is moot.

    Pretty sure every search engine at thing point has a option to just “not show results from this website” or equivalent.

    Out of sight out of mind.

  • Levi@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    24 hours ago

    If redirecting with /etc/hosts isn’t enough, you could set up a cron job (I guess as root?) to re-copy a hosts file back to /etc/hosts every half hour or something. That way even if you do manually change /etc/hosts for an quick peak of an illicit website, it’ll go back to being blocked in a short amount of time. This’ll add a bit of the “pain in the ass” factor.