SlideShare a Scribd company logo
1 of 22
Ubuntu & Parental Controls By Jason Holtzapple (jason@bitflip.net) This presentation doesn't deal with the “should you or shouldn't you” part of the parental controls debate. The focus is on one solution for the “should” side. Requirements ,[object Object]
Children's web access should use a white list of domains.
Adults must be able to access unfiltered web content from the children's computers with a password.
Controls should be non-trivial to bypass. In order to achieve this, we need two basic things: ,[object Object]
A home server. Only adults have logins on this server.
Home Network Diagram ,[object Object]
192.168.1.7 – home proxy server (Ubuntu latest - wired)
192.168.1.3 – parent's laptop (any OS – wireless)
192.168.1.8 – kid's computer (dual boot Ubuntu/Windows - wireless
Step 1 - Lock Down The Router This is not a high security configuration but hopefully it will be enough to last until your kids are in middle school. For slightly higher security you might block all outgoing Internet access from your home network except from the proxy server. You need a router with the ability to block Internet access from certain computers – ideally by MAC address but IP address would also be acceptable. Most if not all current consumer routers should have this ability. Enter the kid's computers MAC addresses and remove all access – this will force them to use the proxy server. If your router supports it, assign static DHCP IP address to the children's computers. The screenshots below are examples using Tomato 3rd party firmware on a Linksys WRT54G v4 wireless access point.
Access Control
Static DHCP assignment
Step 2 – Set Up Squid Install squid and dansguardian on your home server before continuing: $ sudo aptitude install squid $ sudo aptitude install dansguardian These examples use software provided in the Ubuntu 9.04 repositories – Squid 2.7 and DansGuardian 2.9. I chose the Squid proxy for my own setup because of prior familiarity and because it supports user authentication. TinyProxy would have been my first choice but it does not support user authentication.
Step 2 – Set Up Squid You could spend several months learning all the Squid options in /etc/squid/squid.conf, but here are the ones most important for this project: auth_param basic program /usr/lib/squid/pam_auth  auth_param basic children 5  auth_param basic realm Please enter your name and password  auth_param basic credentialsttl 2 hours  acl password proxy_auth user1 user2  These directives allow users user1 and user2 to authenticate to the proxy using their Ubuntu account user and password (accounts have been created separately on the proxy server in the standard way).
Step 2 – Set Up Squid acl our_networks src 192.168.1.0/24 acl DAY time 06:00-20:00  acl DANSGUARDIAN src 127.0.0.1  acl CHILDRENS src 192.168.1.8 192.168.1.9  http_access allow DANSGUARDIAN DAY  http_access deny DANSGUARDIAN  http_access allow CHILDRENS password  http_access allow our_networks  http_access allow localhost  http_access deny all  These directives allow access through the local DansGuardian proxy during the DAY, allow access directly from the children's computers (i.e. not through DansGuardian) with a password, and allow access from any other computer on the local subnet. The entire squid.conf file is very large. If you'd like to see these options in context, an example squid.conf file is available in the “Presentations” section of  http://bitflip.net
Step 3 – Set Up DansGuardian This step is also done on your home server. First, configure dansguardian as a filtering proxy by setting groupmode = 1 In /etc/dansguardian/dansguardianf1.conf Next, add any domains you need to enable to /etc/dansguardian/lists/exceptionsitelist (white list) and /etc/dansguardian/lists/greysitelist (grey list). The difference between the two lists is that Dansguardian will still scan domains in the grey list for inappropriate content and viruses. Domains in the white list are not scanned for content at all. I usually use the grey list for most domains except software updates. I did need to move littlestpetshop.com to the white list as some of the Flash content was being inappropriately flagged as containing Japanese pornography. No filter is foolproof and it's likely you'll need to fine tune your configuration at some point.
Step 3 – Set Up DansGuardian Example exceptionsitelist: avast.com  littlestpetshop.com  windowsupdate.microsoft.com  dansguardian.org  safer-networking.org  spybotupdates.com  ubuntu.com  virtualbox.org  weather.noaa.gov  update.microsoft.com  windowsupdate.com  dell.com  Example greysitelist : funbrain.com  learningbox.com  lego.com  oswego.org  primarygames.com  rainforestmaths.com  shiningstars.com  starfall.com  pbskids.org  scratch.mit.edu  By default in Ubuntu, Dansguardian blocks known viruses (through ClamAV), certain file extensions and pornography. If you need to add additional filtered categories (violence, gambling, etc) or unblock certain extensions, edit the configuration files in /etc/dansguardian/lists.
Step 4 – Create Proxy AutoConfig If you would like to use the proxy auto-detect feature of your favorite browser, you can set up a proxy auto-config file. You'll need a web server running on your home server – setting this up is not covered in this presentation, but there are many guides available. For best support in all browsers, you should set up DHCP and DNS discovery methods. First, create a javascript URL->proxy definition.
Step 4 – Create Proxy AutoConfig function FindProxyForURL(url, host) {  if (shExpMatch(url, "*.home/*"))  {return "DIRECT";} # no proxy for our LAN DNS domain if (shExpMatch(url, "127.0.0.1/*")) {return "DIRECT";} # no proxy if (shExpMatch(url, "localhost/*")) {return "DIRECT";} # no proxy # children use DansGuardian if (isInNet(host, "192.168.1.8",  "255.255.255.255"))  {  return "PROXY 192.168.1.7:8080";  }  # all others use Squid if available, otherwise no proxy  return "PROXY 192.168.1.7:3128; DIRECT";  }  I have .home defined as a local TLD for devices on my home LAN. Save this file as proxy.pac and wpad.dat in the document root  of your home web server.
Step 4 – Create Proxy AutoConfig For the DNS method, create a DNS alias in your DNS server for “wpad.myhomedomain”. Your browser will request the URL http://wpad.myhomedomain/wpad.dat for proxy auto-configuration. This is supported by Firefox and IE. For the DCHP method, add dhcp-option 252 to your DHCP server configuration containing the proxy auto-config URL. This is supported by IE.
Proxy AutoConfig DHCP Setup
Step 5 – Set Up Clients Web Filtering This is the easy part. Set the proxy on the children's web browsers to the IP address of your new proxy server and use the DansGuardian port – 8080 (http://192.168.1.7:8080). On computers that don't need filtering you can set the proxy directly to Squid port 3128. If you've configured proxy auto-config you can select that instead. If you have multiple computers at home I recommend setting up your distro's package manager to use the new proxy. You can do this in Synaptic in the Preferences->Settings->Network tab.

More Related Content

What's hot

Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-serverHARRY CHAN PUTRA
 
A @textfiles approach to gathering the world's DNS
A @textfiles approach to gathering the world's DNSA @textfiles approach to gathering the world's DNS
A @textfiles approach to gathering the world's DNSRob Fuller
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreBenjamin Moore
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSSiddharth Ram Dinesh
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installationfranbow
 
How to Block Malicious Address by Using Feed Service?
How to Block Malicious Address by Using Feed Service?How to Block Malicious Address by Using Feed Service?
How to Block Malicious Address by Using Feed Service?İbrahim UÇAR
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
PM : code faster
PM : code fasterPM : code faster
PM : code fasterPHPPRO
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppJim Jagielski
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksGlen Ogilvie
 
Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Enrique Davila
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsMarcelo Pinheiro
 
Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.AOE
 
Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP ApisAdrian Cole
 

What's hot (19)

Using aphace-as-proxy-server
Using aphace-as-proxy-serverUsing aphace-as-proxy-server
Using aphace-as-proxy-server
 
Network Manual
Network ManualNetwork Manual
Network Manual
 
A @textfiles approach to gathering the world's DNS
A @textfiles approach to gathering the world's DNSA @textfiles approach to gathering the world's DNS
A @textfiles approach to gathering the world's DNS
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMoore
 
Document Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OSDocument Management: Opendocman and LAMP installation on Cent OS
Document Management: Opendocman and LAMP installation on Cent OS
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Ex.no1
Ex.no1Ex.no1
Ex.no1
 
How to Block Malicious Address by Using Feed Service?
How to Block Malicious Address by Using Feed Service?How to Block Malicious Address by Using Feed Service?
How to Block Malicious Address by Using Feed Service?
 
DNSTap Webinar
DNSTap WebinarDNSTap Webinar
DNSTap Webinar
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
PM : code faster
PM : code fasterPM : code faster
PM : code faster
 
gofortution
gofortutiongofortution
gofortution
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer App
 
are available here
are available hereare available here
are available here
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16
 
Porting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability SystemsPorting Rails Apps to High Availability Systems
Porting Rails Apps to High Availability Systems
 
Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.Redundancy Rocks. Redundancy Rocks.
Redundancy Rocks. Redundancy Rocks.
 
Efficient HTTP Apis
Efficient HTTP ApisEfficient HTTP Apis
Efficient HTTP Apis
 

Viewers also liked

Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosjasonholtzapple
 
Tame your web site with the MODx content management system
Tame your web site with the MODx content management systemTame your web site with the MODx content management system
Tame your web site with the MODx content management systemjasonholtzapple
 
Facebook
FacebookFacebook
Facebookepeekid
 
Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...
Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...
Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...Nagios
 
Activism x Technology
Activism x TechnologyActivism x Technology
Activism x TechnologyWebVisions
 
How to Battle Bad Reviews
How to Battle Bad ReviewsHow to Battle Bad Reviews
How to Battle Bad ReviewsGlassdoor
 
Pgr Meeting 1 27 12 Szaro Mccr Final
Pgr Meeting 1 27 12 Szaro Mccr FinalPgr Meeting 1 27 12 Szaro Mccr Final
Pgr Meeting 1 27 12 Szaro Mccr FinalJennifer Szaro
 
Ouc introduction to renewables 1 hr
Ouc introduction to renewables 1 hrOuc introduction to renewables 1 hr
Ouc introduction to renewables 1 hrJennifer Szaro
 
Greenovations ouc presentation
Greenovations ouc presentationGreenovations ouc presentation
Greenovations ouc presentationJennifer Szaro
 
Woolvs In The Sitee
Woolvs In The SiteeWoolvs In The Sitee
Woolvs In The Siteeguestaeb637
 
世界の携帯ソーシャルメディア
世界の携帯ソーシャルメディア世界の携帯ソーシャルメディア
世界の携帯ソーシャルメディアarcarna
 
地域ソーシャルメディア
地域ソーシャルメディア地域ソーシャルメディア
地域ソーシャルメディアarcarna
 
OUC community solar 4-8-14
OUC community solar 4-8-14OUC community solar 4-8-14
OUC community solar 4-8-14Jennifer Szaro
 
Socialmedia in Japan
Socialmedia in JapanSocialmedia in Japan
Socialmedia in Japanarcarna
 
企業のソーシャルメディア活用
企業のソーシャルメディア活用企業のソーシャルメディア活用
企業のソーシャルメディア活用arcarna
 
ソーシャルネットワーキング動向 08
ソーシャルネットワーキング動向 08ソーシャルネットワーキング動向 08
ソーシャルネットワーキング動向 08arcarna
 
Dubai Int'l. Humanitarian and Develoment Conference, April 2009
Dubai Int'l. Humanitarian and Develoment Conference, April 2009Dubai Int'l. Humanitarian and Develoment Conference, April 2009
Dubai Int'l. Humanitarian and Develoment Conference, April 2009guest28f8f9d2
 
2013: The Year of Aggregation & Integration
2013: The Year of Aggregation & Integration2013: The Year of Aggregation & Integration
2013: The Year of Aggregation & IntegrationKristen Green
 

Viewers also liked (20)

Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Tame your web site with the MODx content management system
Tame your web site with the MODx content management systemTame your web site with the MODx content management system
Tame your web site with the MODx content management system
 
Facebook
FacebookFacebook
Facebook
 
Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...
Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...
Nagios Conference 2013 - Troy Lea - Leveraging and Understanding Performance ...
 
Activism x Technology
Activism x TechnologyActivism x Technology
Activism x Technology
 
How to Battle Bad Reviews
How to Battle Bad ReviewsHow to Battle Bad Reviews
How to Battle Bad Reviews
 
Pgr Meeting 1 27 12 Szaro Mccr Final
Pgr Meeting 1 27 12 Szaro Mccr FinalPgr Meeting 1 27 12 Szaro Mccr Final
Pgr Meeting 1 27 12 Szaro Mccr Final
 
Ipva Process
Ipva ProcessIpva Process
Ipva Process
 
Ouc introduction to renewables 1 hr
Ouc introduction to renewables 1 hrOuc introduction to renewables 1 hr
Ouc introduction to renewables 1 hr
 
Greenovations ouc presentation
Greenovations ouc presentationGreenovations ouc presentation
Greenovations ouc presentation
 
Woolvs In The Sitee
Woolvs In The SiteeWoolvs In The Sitee
Woolvs In The Sitee
 
世界の携帯ソーシャルメディア
世界の携帯ソーシャルメディア世界の携帯ソーシャルメディア
世界の携帯ソーシャルメディア
 
地域ソーシャルメディア
地域ソーシャルメディア地域ソーシャルメディア
地域ソーシャルメディア
 
OUC community solar 4-8-14
OUC community solar 4-8-14OUC community solar 4-8-14
OUC community solar 4-8-14
 
Socialmedia in Japan
Socialmedia in JapanSocialmedia in Japan
Socialmedia in Japan
 
企業のソーシャルメディア活用
企業のソーシャルメディア活用企業のソーシャルメディア活用
企業のソーシャルメディア活用
 
ソーシャルネットワーキング動向 08
ソーシャルネットワーキング動向 08ソーシャルネットワーキング動向 08
ソーシャルネットワーキング動向 08
 
Dubai Int'l. Humanitarian and Develoment Conference, April 2009
Dubai Int'l. Humanitarian and Develoment Conference, April 2009Dubai Int'l. Humanitarian and Develoment Conference, April 2009
Dubai Int'l. Humanitarian and Develoment Conference, April 2009
 
2013: The Year of Aggregation & Integration
2013: The Year of Aggregation & Integration2013: The Year of Aggregation & Integration
2013: The Year of Aggregation & Integration
 
Arc gis fl_biomass
Arc gis fl_biomassArc gis fl_biomass
Arc gis fl_biomass
 

Similar to Ubuntu And Parental Controls

Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guidejasembo
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway ServerDashamir Hoxha
 
"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii Shumada"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii ShumadaFwdays
 
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]Krisman Tarigan
 
DirectShare Quick Start Setup Guide
DirectShare Quick Start Setup GuideDirectShare Quick Start Setup Guide
DirectShare Quick Start Setup GuideChristian Petrou
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web ApplicationNull bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web ApplicationAnant Shrivastava
 
Free tools for win server administration
Free tools for win server administrationFree tools for win server administration
Free tools for win server administrationConcentrated Technology
 
Squid proxy server
Squid proxy serverSquid proxy server
Squid proxy serverGreen Jb
 
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Patricia Aas
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!Marko Heijnen
 
DansGuardian open source content filtering
DansGuardian open source content filteringDansGuardian open source content filtering
DansGuardian open source content filteringAndrew Vandever
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleChanaka Lasantha
 
Lessons Learned in Automating Compliance for Containers
Lessons Learned in Automating Compliance for ContainersLessons Learned in Automating Compliance for Containers
Lessons Learned in Automating Compliance for ContainersAll Things Open
 

Similar to Ubuntu And Parental Controls (20)

Squid proxy-configuration-guide
Squid proxy-configuration-guideSquid proxy-configuration-guide
Squid proxy-configuration-guide
 
Building a Gateway Server
Building a Gateway ServerBuilding a Gateway Server
Building a Gateway Server
 
Bsd routers
Bsd routersBsd routers
Bsd routers
 
"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii Shumada"13 ways to run web applications on the Internet" Andrii Shumada
"13 ways to run web applications on the Internet" Andrii Shumada
 
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
18587936 squid-proxy-configuration-guide - [the-xp.blogspot.com]
 
DirectShare Quick Start Setup Guide
DirectShare Quick Start Setup GuideDirectShare Quick Start Setup Guide
DirectShare Quick Start Setup Guide
 
Backtrack Manual Part4
Backtrack Manual Part4Backtrack Manual Part4
Backtrack Manual Part4
 
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPHands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHP
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Null bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web ApplicationNull bhopal Sep 2016: What it Takes to Secure a Web Application
Null bhopal Sep 2016: What it Takes to Secure a Web Application
 
Free tools for win server administration
Free tools for win server administrationFree tools for win server administration
Free tools for win server administration
 
Squid proxy server
Squid proxy serverSquid proxy server
Squid proxy server
 
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)Linux Security  and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
Linux Security and How Web Browser Sandboxes Really Work (NDC Oslo 2017)
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!
 
Download It
Download ItDownload It
Download It
 
Xdebug
XdebugXdebug
Xdebug
 
DansGuardian open source content filtering
DansGuardian open source content filteringDansGuardian open source content filtering
DansGuardian open source content filtering
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Lessons Learned in Automating Compliance for Containers
Lessons Learned in Automating Compliance for ContainersLessons Learned in Automating Compliance for Containers
Lessons Learned in Automating Compliance for Containers
 

Ubuntu And Parental Controls

  • 1.
  • 2. Children's web access should use a white list of domains.
  • 3. Adults must be able to access unfiltered web content from the children's computers with a password.
  • 4.
  • 5. A home server. Only adults have logins on this server.
  • 6.
  • 7. 192.168.1.7 – home proxy server (Ubuntu latest - wired)
  • 8. 192.168.1.3 – parent's laptop (any OS – wireless)
  • 9. 192.168.1.8 – kid's computer (dual boot Ubuntu/Windows - wireless
  • 10. Step 1 - Lock Down The Router This is not a high security configuration but hopefully it will be enough to last until your kids are in middle school. For slightly higher security you might block all outgoing Internet access from your home network except from the proxy server. You need a router with the ability to block Internet access from certain computers – ideally by MAC address but IP address would also be acceptable. Most if not all current consumer routers should have this ability. Enter the kid's computers MAC addresses and remove all access – this will force them to use the proxy server. If your router supports it, assign static DHCP IP address to the children's computers. The screenshots below are examples using Tomato 3rd party firmware on a Linksys WRT54G v4 wireless access point.
  • 13. Step 2 – Set Up Squid Install squid and dansguardian on your home server before continuing: $ sudo aptitude install squid $ sudo aptitude install dansguardian These examples use software provided in the Ubuntu 9.04 repositories – Squid 2.7 and DansGuardian 2.9. I chose the Squid proxy for my own setup because of prior familiarity and because it supports user authentication. TinyProxy would have been my first choice but it does not support user authentication.
  • 14. Step 2 – Set Up Squid You could spend several months learning all the Squid options in /etc/squid/squid.conf, but here are the ones most important for this project: auth_param basic program /usr/lib/squid/pam_auth auth_param basic children 5 auth_param basic realm Please enter your name and password auth_param basic credentialsttl 2 hours acl password proxy_auth user1 user2 These directives allow users user1 and user2 to authenticate to the proxy using their Ubuntu account user and password (accounts have been created separately on the proxy server in the standard way).
  • 15. Step 2 – Set Up Squid acl our_networks src 192.168.1.0/24 acl DAY time 06:00-20:00 acl DANSGUARDIAN src 127.0.0.1 acl CHILDRENS src 192.168.1.8 192.168.1.9 http_access allow DANSGUARDIAN DAY http_access deny DANSGUARDIAN http_access allow CHILDRENS password http_access allow our_networks http_access allow localhost http_access deny all These directives allow access through the local DansGuardian proxy during the DAY, allow access directly from the children's computers (i.e. not through DansGuardian) with a password, and allow access from any other computer on the local subnet. The entire squid.conf file is very large. If you'd like to see these options in context, an example squid.conf file is available in the “Presentations” section of http://bitflip.net
  • 16. Step 3 – Set Up DansGuardian This step is also done on your home server. First, configure dansguardian as a filtering proxy by setting groupmode = 1 In /etc/dansguardian/dansguardianf1.conf Next, add any domains you need to enable to /etc/dansguardian/lists/exceptionsitelist (white list) and /etc/dansguardian/lists/greysitelist (grey list). The difference between the two lists is that Dansguardian will still scan domains in the grey list for inappropriate content and viruses. Domains in the white list are not scanned for content at all. I usually use the grey list for most domains except software updates. I did need to move littlestpetshop.com to the white list as some of the Flash content was being inappropriately flagged as containing Japanese pornography. No filter is foolproof and it's likely you'll need to fine tune your configuration at some point.
  • 17. Step 3 – Set Up DansGuardian Example exceptionsitelist: avast.com littlestpetshop.com windowsupdate.microsoft.com dansguardian.org safer-networking.org spybotupdates.com ubuntu.com virtualbox.org weather.noaa.gov update.microsoft.com windowsupdate.com dell.com Example greysitelist : funbrain.com learningbox.com lego.com oswego.org primarygames.com rainforestmaths.com shiningstars.com starfall.com pbskids.org scratch.mit.edu By default in Ubuntu, Dansguardian blocks known viruses (through ClamAV), certain file extensions and pornography. If you need to add additional filtered categories (violence, gambling, etc) or unblock certain extensions, edit the configuration files in /etc/dansguardian/lists.
  • 18. Step 4 – Create Proxy AutoConfig If you would like to use the proxy auto-detect feature of your favorite browser, you can set up a proxy auto-config file. You'll need a web server running on your home server – setting this up is not covered in this presentation, but there are many guides available. For best support in all browsers, you should set up DHCP and DNS discovery methods. First, create a javascript URL->proxy definition.
  • 19. Step 4 – Create Proxy AutoConfig function FindProxyForURL(url, host) { if (shExpMatch(url, "*.home/*")) {return "DIRECT";} # no proxy for our LAN DNS domain if (shExpMatch(url, "127.0.0.1/*")) {return "DIRECT";} # no proxy if (shExpMatch(url, "localhost/*")) {return "DIRECT";} # no proxy # children use DansGuardian if (isInNet(host, "192.168.1.8", "255.255.255.255")) { return "PROXY 192.168.1.7:8080"; } # all others use Squid if available, otherwise no proxy return "PROXY 192.168.1.7:3128; DIRECT"; } I have .home defined as a local TLD for devices on my home LAN. Save this file as proxy.pac and wpad.dat in the document root of your home web server.
  • 20. Step 4 – Create Proxy AutoConfig For the DNS method, create a DNS alias in your DNS server for “wpad.myhomedomain”. Your browser will request the URL http://wpad.myhomedomain/wpad.dat for proxy auto-configuration. This is supported by Firefox and IE. For the DCHP method, add dhcp-option 252 to your DHCP server configuration containing the proxy auto-config URL. This is supported by IE.
  • 22. Step 5 – Set Up Clients Web Filtering This is the easy part. Set the proxy on the children's web browsers to the IP address of your new proxy server and use the DansGuardian port – 8080 (http://192.168.1.7:8080). On computers that don't need filtering you can set the proxy directly to Squid port 3128. If you've configured proxy auto-config you can select that instead. If you have multiple computers at home I recommend setting up your distro's package manager to use the new proxy. You can do this in Synaptic in the Preferences->Settings->Network tab.
  • 23. Step 5 – Set Up Clients Time Limits If you are using Ubuntu and want to set up time limits on the computers, you can use timekpr – available from http://freshmeat.net/projects/timekpr Source code is available for timekpr, but it may not work with non-Ubuntu flavors of Linux. I know of no equivalent free to use program for Windows but there are several that can be purchased. TimezUpKids - http://www.timesupkidz.com ($30) is one that I have used successfully.
  • 26. Step 6 – Application Control If only kids use the computer, don't install software you don't want them use and don't put kids in the administrator group. On a shared computer, group execute bits may be the solution. The installer of Ubuntu is put in the admin group. To limit application usage to members of this group: $ sudo chgrp admin /usr/bin/pidgin $ sudo chmod o-rwx /usr/bin/pidgin
  • 27. Step 7 – Optional Programs It would be nice to be able to add domains to the white and grey lists without editing text files and restarting DansGuardian. Then other members of your family will be able to change the lists easily as well. I wrote a simple CGI script to allow these to be changed with a web page. Because the script needs to run certain commands as root (restart DansGuardian and modify the DansGuardian configuration files), /etc/sudoers needs to be updated with these commands. Also, so as not to defeat the entire purpose of our project, the script should be password-protected. Source code for this program is available at http://bitflip.net in the “Presentations” section.
  • 28. Step 7 – Optional Programs
  • 29. Conclusion For better or worse Ubuntu does not have the suite of parental controls included in current versions of Windows and MacOS. However, those controls can often be trivially bypassed with Live CDs or other methods. Parental controls are not a substitute for good parenting, but they can be used to create a safer computing environment at home.