Internet Access Filtering With OpenDNS
Originally posted February 3, 2008
Brian Dailey is a LAMP-stack developer with a wide range of experience in the development world. Get in touch!
For more articles on the development trade, see the Blog.
What's a free, easy-to-use alternative?
For most who wish to filter access, OpenDNS is often a good solution. It's free, it doesn't require any software installation, and the filtering (provided by St. Bernard Software) is pretty good. Additionally, it has the added benefit of protecting users from phishing attacks and can customize white listed domains (permanently "allowed" web sites) and block other specific domains.
Setting Up Your OpenDNS Account
First you will need to set up an account with OpenDNS. To do this, go to the OpenDNS registration page. Once you have created an account, sign in and go to the "Networks" tab.

In the box labeled "IP" your IP address should already be entered. If it is not, you can go to whatismyip.com to obtain your IP address and put it in the boxes. Once you've entered it, add it to your networks.
Now go to the settings page and under the "Filtering" menu item you will have option to create a Whitelist (domain names that are never blocked), choose settings for blocking adult websites, block specific domain names under "Domain Name Blocking," and choose how you want to filter known phishing websites. I recommend blocking proxy/anonymizer websites since users can use proxies to bypass the filter.

Setting Up OpenDNS On Your Network Or Computer
The trickier part of setting up the blocking is configuring your router or computer to use the DNS filter.
If you have a router (such as a wireless router) you can set it up on the router box and it will apply to all computers on the network. Be aware, however, that users can change their computer's individual configuration to use a different DNS server, thereby circumventing the filter. I cannot provide specific instructions for setting up your router to use OpenDNS, as all routers are different. In short, what you will want to do is log into your router and find the settings for "DNS (Domain Name Server) Address." Most routers will be configured to obtain the DNS address automatically. You will want to change this to provide it manually, and use the numbers provided on the OpenDNS website (currently 208.67.222.222 and 208.67.220.220). Save this setting, reboot your computer (rebooting may not be necessary, test it first) and you should be up and running.
If you do not have a router you will have to configure each computer seperately. To do this in Windows, the easiest way is to locate the "network" icon in your taskbar (lower right-hand corner of your desktop, it looks like two connected computers, and it's usually flashing), right click on it, and click Status.

In the dialog box that opens, click "Properties." In the "Local Area Connection Properties" box (title may not match exactly, that's ok) there is a box that is labeled "This connection uses the following items." In this list, find "Internet Protocol (TCP/IP)." Click on it, and then click "Properties." In the new dialog box, choose the option to "Use the following DNS server addresses" and the provide the OpenDNS IP addresses (currently 208.67.222.222 and 208.67.220.220, see OpenDNS.org) in the box below.

Click "Ok", then "Ok" again to save the settings. You can close the status box, and then you should be using the OpenDNS servers.
Once you are set up use the OpenDNS test page to confirm that you're using OpenDNS.
Additional Uses and Tips
OpenDNS will also allow you to track usage of their service (it will report when a blocked site is visited, but not which site it was). You can enable this by going to the "Settings" tab and choosing the "Stats and Logs" page. The stats can be later viewed under the "Stats" tab.
Occasionally internet service providers will change your IP address. If this occurs, OpenDNS will no longer filter access. You can monitor this by occasionally visiting the OpenDNS test page or (if you feel up to the challenge) setting up dynamic DNS updates. If you choose to not set up dynamic updates, you can use the manual method following the instructions on the OpenDNS website.
very helpful, thank you!