How do I block the entire Internet except a few 'whitelist sites'?

14,552

You can consider Privoxy, available from the Ubuntu Software Center. It's a proxy server that may do what you want. Section 3.27 has this:

3.27. Can I set-up Privoxy as a whitelist of "good" sites?

Sure. There are a couple of things you can do for simple white-listing. Here's one real easy one:

############################################################

Blacklist

######################################################

{ +block } / # Block all URLs

############################################################

Whitelist

######################################################

{ -block }
kids.example.com
toys.example.com
games.example.com
This allows access to only those three sites by first blocking all URLs, and then subsequently allowing three specific exceptions.

Another approach is Privoxy's trustfile concept, which incorporates the notion of "trusted referrers". See the Trust documentation for details.

These are fairly simple approaches and are not completely foolproof. There are various other configuration options that should be disabled (described elsewhere here and in the User Manual) so that users can't modify their own configuration and easily circumvent the whitelist.

Share:
14,552
web.learner
Author by

web.learner

Updated on November 22, 2022

Comments

  • web.learner
    web.learner over 1 year

    I need some method to block the entire Internet other then a few sites on my 'whitelist'. I am looking for a solution that is not browser specific - so no add-ons/plugin suggestions please. Is there any file within the system or some Command to run in the terminal that will allow me to do this ?

    • Admin
      Admin almost 12 years
      What Ubuntu release are you running? How are you connecting to the Internet?
    • Admin
      Admin almost 12 years
      You are probably looking for something like a firewall -- to give you a keyword to check for. A firewall limits access globally, and can work in both directions (from you to the internet and vice versa).
  • Admin
    Admin almost 11 years
    I've installed privoxy but can't find this blacklist or whitelist anywhere.
  • Admin
    Admin almost 11 years
    Hi, I haven't yet re-installed Privoxy after doing a clean install of Lubuntu 13.04. But I will get around to it soonish :) I'll ping you then!
  • Admin
    Admin almost 11 years
    @JoshuaRobison, Looks like you solved your problem here?