Avatar of sqlagent007
sqlagent007Flag for United States of America

asked on 

How can I block all but a few websites on a raspberry pi?

How can I block all but a few websites on a raspberry pi? I have created a PI for my children and I need to limit internet access to all but a few sites.

I have tried installing "privoxy" and creating a WHITELIST / BLACKLIST in section 4 of the config file
https://www.privoxy.org/faq/configuration.html
- 3.27. Can I set-up Privoxy as a whitelist of "good" sites?

However when I reboot the PI and attempt any site not in the white list I am able to browse the site.

I took this directly from the documentation and have tired it with and without the "{" wrapping the +block command.
############################################################
 # Blacklist
 ############################################################
 { +block }
 / # Block *all* URLs

 ############################################################
 # Whitelist
 ############################################################
 { -block }
  kids.example.com
  toys.example.com
  games.example.com

Open in new window


Can anybody help me understand what I am doing wrong?
Raspberry Pi

Avatar of undefined
Last Comment
sqlagent007
Avatar of Dr. Klahn
Dr. Klahn

In order for the proxy to filter sites, the browser must be configured to use the proxy rather than normal internet service.  This does not happen automatically.

In Firefox, look under Tools > Options > Advanced > Network > Connection > Settings.  If you are lucky you will be able to use the Automatic Detection option; if not, you will need to configure the proxy settings using information from the privoxy setup.

Note that this setting can be un-set just as easily as it is set up by anyone using Firefox.  For whole-system filtering which cannot be bypassed a different solution is needed.
Avatar of sqlagent007
sqlagent007
Flag of United States of America image

ASKER

Thank you Dr. Do you or anybody know how I can just block all internet traffic except a handful of sites on a Raspberry PI?
Avatar of Dr. Klahn
Dr. Klahn

Not an idea, but I'm sure someone will have a solution for you.
Avatar of sqlagent007
sqlagent007
Flag of United States of America image

ASKER

I added this, but still no luck, from what I understand this points the chromium browser to the local host.

chromium-browser --proxy-server="127.0.0.1"  

Open in new window

Avatar of sqlagent007
sqlagent007
Flag of United States of America image

ASKER

I figured out how to to this on his MacBook in about 2 minutes.
ASKER CERTIFIED SOLUTION
Avatar of sqlagent007
sqlagent007
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Raspberry Pi
Raspberry Pi

The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future. We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.

252
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo