If you have children at home who routinely access the computer, you might be worried about them being exposed to adult materials and porn easily available and accessible all over the internet. In this tutorial, we will see how to block porn and adult content in Ubuntu.
Blocking porn is extremely easy thanks to the wonderful OpenDNS. It is basically DNS blocking. Basically, we will replace your current DNS server with OpenDNS. OpenDNS has a database of adult websites all over the internet. So, whenever am adult website is tried to be accessed, DNS server redirects to a warning page. This is the least painful way of blocking adult content because you don’t need to bother about what websites are good or bad.
OpenDNS has free services for home users who want to block access to inappropriate websites on their computer (or router). There are two types of free service available with OpneDNS for content filtering:
- OpenDNS Home
- OpenDNS FamilyShield
If you are looking for easy configuration to block porn material, go for OpenDNS FamilyShield. You can choose to do the content filtering at two levels:
- On your computer
- On you router
If you do it on your router, porn and other such material will be blocked for all the devices that connect to your home network. In this tutorial, we will see how to do it on your computer.
Setting OpenDNS on your Ubuntu:
OpenDNS works by changing your DNS to its own DNS server. And with this, it blocks a pre-defined (by OpneDNS community) set of websites which it terms as ‘harmful’.
Step 1:
Open the Network Settings. To do this, search for Network Settings in Unity Dash.
Step 2:
Select the type of network you use: Wired or Wireless and then click on Options from the lower bottom corner to edit the connection settings.
Step 3:
- Now in here, go to IPv4 Settings tab.
- Change the Method to Automatic (DHCP) addresses only.
- Use these two DNS servers in the field DNS Severs: 208.67.222.123, 208.67.220.123
- Save it and reboot your computer.
Possible troubleshoot:
If your settings get changed after each reboot, get it fixed via terminal:
$ sudo cp /etc/resolv.conf /etc/resolv.conf.auto
$ gksudo gedit /etc/dhcp3/dhclient.conf
# add the following line to the document before the ‘return subnet-mask’ command
prepend domain-name-servers 208.67.222.222,208.67.220.220;
# save and exit
$ sudo ifdown eth0 && sudo ifup eth0
You may be required to change eth0 to your own network device’s name if it uses a non-standard name.
Read here for more details and setting it on your router. I hope you block porn as easily as you can find the wifi access points in Ubuntu.
Great tutorial, an alternative solution would be to setup a PieHole server at home, here is a complete tutorial on how to do just that.
http://www.ubuntuboss.com/how-to-install-piehole-on-ubuntu-16-04/
Update your signup link for OpenDNS to https://signup.opendns.com/homefree/
opendns not blocking those contents in dynamic ip computers, i am using norton dns to protect from those sites
@rajatirupur:disqus
Redundant question perhaps, but does Norton works for dynamic IP?
[…] Continuing with Ubuntu and religion, Ubuntu CE is another Ubuntu based distribution Christians. CE in its name meant Christian Edition. Apart from providing Ubuntu various Christian software such as Xiphos, OpenLP, Quelea etc., Ubuntu CE also provides an integrated web content parental controls. This is something you can do with OpenDNS in Ubuntu. […]
Funny how ubuntu is on top and 97% off all supercomputer run linux. The pros know.