|

How To Block Adult Content On Ubuntu Linux

How to block adult content and porn in Ubuntu Linux

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
OpenDNS

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.

Block adult content with OpenDNS in Linux

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.

Ubuntu Network Settings

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.

Ubuntu-Network_settings-1

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
sudo 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. Now restart the network in Ubuntu:

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.

Similar Posts

  • Like mentioned before, you are still able to search whatever you like in google and the results are not filtered. I understand you can’t filter this with a DNS filter, but I am wondering if there is another way to block this.

  • Thanks for the article! I’ve used OpenDNS in the past and it’s worked well. The biggest challenge I have is the image search on Google and other search engines. Anyway to lock that down?