FAQ > OS > HOW TO > SCHOOL > WHITELIST

WHITELISTING

There are many services and software designed to blacklist bad web sites. But, users can and do learn how to get around these "site-blockers," and there's a bad website born about every minute. Keeping up with all the bad websites is next to impossible. A better option for administrators (usually a parent) may be what's called whitelisting on the account or the computer of a non-administrator (usually a child).

white list

Whitelisting means blocking access to everything on the Internet not already approved by the administrator. The computer is cut off from everything on the Internet, except for what the admin has in the whitelist. And it should go without saying; admins should never let their son(s), daughter(s), husband or wife (whoever they are intending to protect) see their administrator password.

White List *buntu

For child's computer or account (especially homeschooled ones), you can download whitelist-buntu.txt  from SavingUS as a base. To add to this list (or to look up any more sites), go to an IP lookup page such as this one or this one. Note: Some websites pull-in content from other servers and / or domain names. Examine the code (view the page source) of the web page / website to find all the addresses you'll want or need. Try searching the page source for "http."

Go to Menu --> System Tools --> LXTerminal or [Ctrl]+[Alt]+[T]
Backup the hosts file first:
sudo cp /etc/hosts /etc/hosts.old
Then edit the hosts file by typing (or copying and pasting):
sudo leafpad /etc/hosts

[Ctrl]+[A] to select all text in the whitelist-buntu.txt file, copy [Ctrl]+[C] then [Ctrl]+[A] to select-all in the hosts file and paste [Ctrl]+[V].

Backup the nsswitch.conf file:
sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.old
then type: sudo leafpad /etc/nsswitch.conf to edit.
Find the hosts line and remove everything but
hosts: files
Save [Ctrl]+[S] and "X" out of the nsswitch.conf file.

Now everything except pre-approved sites are blocked.

Edit the hosts file again to allow access to additional websites (or remove sites). Warning: Google Chrome bypasses /etc/hosts, allowing unrestricted Internet access.

Run updates by reverting to the backup copy of the nsswitch file:
sudo cp /etc/nsswitch.conf.old /etc/nsswitch.conf
and saving [Ctrl]+[S].
Revert back again after updates are complete:
sudo leafpad /etc/nsswitch.conf
find the hosts line and again remove everything but
hosts: files and save [Ctrl]+[S].


REMOVE OTHER INTERNET APPS
You may not want other applications with Internet access to remain once you've whitelisted. In that case, remove the following applications with the Lubuntu Software Center (LSC):

Go to Menu --> System Tools --> Lubuntu Software Center

Lubuntu Software Center

Click on Installed Software

Installed Software

Scroll down to FileZilla, Pidgin or Thurnderbird, select it and hit the "Remove from the system" button

sothere

Provide your password and click OK

Password

Repeat the process for the other two.

Transmission is particularly hard to remove. Doing it with LSC will only install QTransmission and vice-versa.

Instead, go to Menu --> System Tools --> LXTerminal or [Ctrl]+[Alt]+[T]
Then type (or copy and paste): sudo apt-get remove transmission-common -y && sudo apt-get purge transmission-common -y && sudo apt-get autoremove transmission-common -y


Top