logIt Log Around The Clock

Script to Override Current DNS with OpenDNS

tags:

I added the following script (named use-opendns) which basically copies current DNS used to a backup file and then override it with another file already containing OpenDNS resolver.

#! /bin/bash
cp -f /etc/resolv.conf /etc/resolv.assigned.conf
cp -f /etc/opendns.resolv.conf /etc/resolv.conf

I put this in local bin and add a launcher to the panel as Application in Terminal type. The /etc/resolv.conf content is

#OpenDNS http://www.opendns.com/
nameserver 208.67.220.220
nameserver 208.67.222.222

Leave a Reply