OpenDNS

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:24, 20 February 2008 (edit)
HeinekenPissr (Talk | contribs)

← Previous diff
Revision as of 02:06, 6 April 2008 (edit) (undo)
WireSharp (Talk | contribs)
(Intercept DNS Port)
Next diff →
Line 20: Line 20:
# Put /nic/update? in the '''URL''' text box . # Put /nic/update? in the '''URL''' text box .
# Apply # Apply
 +
 +==Intercept DNS Port==
 +You can prevent users from using their own DNS servers (and hence get around content filtering) by intercepting DNS queries and forcing them to use the DNS servers you specify.
 +# Go to the "Administration" tab and the "Commands" sub-tab.
 +# Go to the "Commands" box and paste the following:
 + iptables -t nat -A PREROUTING -p udp -i br0 --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
 + iptables -t nat -A PREROUTING -p tcp -i br0 --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
 +# Click "Save Firewall" (note: your WAN interface will be restarted)

Revision as of 02:06, 6 April 2008

OpenDNS is a free DNS (Domain Name Server) service which makes internet browsing safer and allegedly faster. By simply using their DNS servers instead of your ISP's you are automatically protected from their list of Phishing websites. However, in order to restrict a variety of adult website content you will need to create a free account with them, register your IP address and select the categories you want restricted (i.e. sexuality, nude, pornography, lingerie, grotesque, etc...). Since most of us have DHCP assigned WAN IP addresses that change periodically we need to instruct our router to tell OpenDNS what our new IP address is when it changes. We will go over that below.

Basic Setup

  1. On the Setup tab under Network Address Server Settings (DHCP) look for Static DNS 1 and Static DNS 2
  2. Set Static DNS 1 to 208.67.222.222 and set Static DNS 2 to 208.67.220.220
  3. Apply Settings and go to the Services tab
  4. Under DNSMasq put strict-order in the Additional DNSMasq Options text box
  5. Apply Settings again

OpenDns with DNS-O-Matic for users with a Dynamic IP

  1. Follow instructions for basic setup above.
  2. Setup an account with OpenDns and Enable dynamic IP update under the settings tab on the OpenDNS website. Also enable any filtering options you want.
  3. Log into DNS-O-Matic with the same username and password you use for OpenDNS.
  4. Add OpenDNS as a service on DNS-O-Matic
  5. Now click the "Update Info" radio buttion
  6. On the DDNS tab under Setup in dd-wrt set DDNS Service to Custom.
  7. Set DYNDNS Server to updates.dnsomatic.com
  8. Fill in your Username and Password for OpenDNS/DNS-O-Matic
  9. Set Host Name to all.dnsomatic.com
  10. Put /nic/update? in the URL text box .
  11. Apply

Intercept DNS Port

You can prevent users from using their own DNS servers (and hence get around content filtering) by intercepting DNS queries and forcing them to use the DNS servers you specify.

  1. Go to the "Administration" tab and the "Commands" sub-tab.
  2. Go to the "Commands" box and paste the following:
iptables -t nat -A PREROUTING -p udp -i br0 --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
iptables -t nat -A PREROUTING -p tcp -i br0 --dport 53 -j DNAT --to $(nvram get lan_ipaddr)
  1. Click "Save Firewall" (note: your WAN interface will be restarted)