Hi,
I want to post this information so that next time I need to set this up a quick google search will give me simple instructions. Of course, I hope others will benefit as well :-)
It seems amazing to me that no straightforward instructions for this are available on the web.
Methods are suggested using DNS-O-Matic and various OpenWRT software packages but they seem overly complicated.
The following is my method based on a ton of googling.
The goal:
OpenDNS web filtering (parental controls) work based upon 2 factors. Firstly you must set the DNS server records of your router and DHCP server to the OpenDNS servers 208.67.222.222, 208.67.220.220. (This is straightforward and not covered here)
Secondly, OpenDNS must be aware of your current external IP address given to you on a permanent or temporary basis by your ISP. If you have a fixed (permanent) IP address then this is no problem and you don't need to reed this post - just log in to your open DNS control panel go to settings and check that the IP address shown against your network matches your current IP address as shown at the top of the web page.
If you don't have a fixed IP then you can still set this manually as above, however whenever your DSL connection is restarted and possibly at other unpredictable times your external IP address may be changed by your ISP and your OpenDNS internet filter will no longer function.
Therefore it is necessary to have an automatic method of informing OpenDNS each time the DSL router restarts, or simply on a regular basis. OpenDNS provide a client program to run on Windows and Mac PCs that can do this when the PC is switched on, however this will not be enough if you are also protecting tablets and mobile phones on your network.
The method:
1. Install the curl software package in OpenWRT
2. Log in to your router over SSH:
ssh root@10.0.0.1
3. via SSH, download the HTTPS certificates from http://curl.haxx.se/docs/caextract.html
curl -o /etc/ssl/certs/ca-certificates.crt http://curl.haxx.se/ca/cacert.pem
4. via SSH, create a script to talk to OpenDNS (note: this is a single line):
* Edit this line to enter your details *
echo curl --cacert /etc/ssl/certs/ca-certificates.crt https://[YourOpenDNSLoginName]:[YourOpendnsPassword]@updates.opendns.com/nic/update?hostname=[YourOpendnsLabel] > /root/opendns_update.sh
5. Set up a cron job in OpenDNS to run the script every 10 minutes. In the OpenWRT interface go to System > Scheduled Tasks and enter:
*/10 * * * * /root/opendns_update.sh > /dev/null 2>&1
6. Test by: restarting your ADSL/VDSL connection, login in to opendns and confirm that the 2 IP addresses displayed do not match, wait for the script to run, refresh opendns page see that IP addresses now match.
(Last edited by OFelix on 22 Oct 2015, 20:22)