On Firefox and Chrome, how do I allow the local network and Wikipedia (localhost
, 192.168.1.*
, *.wikipedia.org
, etc) but block everything else? A whitelist essentially. I still however want other tools on the system to have complete access to the internet, e.g. git
, wget
, etc, so the solution must not affect them.
Essentially whitelist the internet on the browser level rather than at the system level.
For Chrome there is a command line parameter you can use:
This maps every domain to localhost excluding wikipedia.
For Firefox create a file
/usr/lib/firefox/distribution/policies.json
with this content:You can find more information about the policies supported by firefox at https://github.com/mozilla/policy-templates
Another option would be to use a userscript (greasmonkey, tampermonkey) to whitelist the web.