[all variants] HowTo set OpenDNS as DNS in DHCP env
Due to the recent vulnerability in the worldwide DNS
http://www.vnunet.com/vnunet/news/22...tacks-reported
http://www.doxpara.com/?p=1189
can be useful to change the DNS provided by your provider and use OpenDNS instead.
By the moment you can check if your actual DNS are vulnerable:
http://www.doxpara.com/
Here is described two ways to do it for DHCP users and without touching the router configuration (for users that have a static IP is pretty straightforward).
Install a simple editor
Install Scite to simplify and unify the editing for all *ubuntu distros.
Code:
sudo apt-get install scite
The first option change permanently the DNS
The second option change the DNS "when you need"
1) Change DNS permanently
Edit the dhcp configuration file:
Code:
sudo scite /etc/dhcp3/dhclient.conf
Add this line at the end and save the file:
Code:
prepend domain-name-servers 208.67.222.222, 208.67.220.220;
Reboot your machine.
Then try a non-existent url like:
http://seeifthednsischangednow.com
You should reach an OpenDNS response as search result in the OpenDNS home page... well you are using OpenDNS DNS.
2 Change DNS when you need
Create a file in your home:
Code:
scite ~/resolv.conf
Write the DNS IP of OpenDNS and save it:
Code:
nameserver 208.67.222.222
nameserver 208.67.220.220
Create a file under /usr/bin
Code:
sudo scite /usr/bin/dnsrenew
Write the following and save it
Code:
cp ~/resolv.conf /etc/resolv.conf
/etc/init.d/networking restart
Then chmod it to create an executable file:
Code:
sudo chmod +x /usr/bin/dnsrenew
Execute the script:
Then try a non-existent url like:
http://seeifthednsischangednow.com
Now you can use the DNS provided by OpenDNS till the next reboot.
The Samba fix with OpenDNS (or external DNS)
If you are using Samba (as supposed to be) and you are using the DNS of OpenDNS (or any external dns), you must change the configuration of Samba in order to be able to browse your LAN; so, edit your configuration file in this way:
Code:
sudo scite /etc/samba/smb.conf
and change the line of the name resolver section in this way:
Code:
name resolve order = lmhosts bcast wins host
Save and close the file
Then restart Samba:
Code:
sudo /etc/init.d/samba restart
Wait 10/15 minutes and you are able to browse your LAN with the new DNS.
I write this little HowTo just to use OpenDNS because I appreciate their service, I'm not involved in OpenDNS team.
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Temporarily stickied. dentaku, check your Pms :)
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Thanks.
Is this easy to be undone when my DNS gets patched? How?
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Yes it is. If you choose the first option just edit the dhclient.conf
Code:
sudo nano /etc/dhcp3/dhclient.conf
and change this line
Code:
prepend domain-name-servers 208.67.222.222, 208.67.220.220;
with this line
Code:
#prepend domain-name-servers 208.67.222.222, 208.67.220.220;
Reboot your box.
If you choose second option, just reboot the box.
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Also, if you're having your IP changing every day at midnight for example or it changes every time you disconnect and connect your router - here's my tip how to keep OpenDNS up-to-date with our IP.
First of all, install inadyn :
Code:
sudo apt-get install inadyn
Then, edit /etc/inadyn.conf file :
Code:
sudo gedit /etc/inadyn.conf
Paste there following content :
Code:
--username YOURUSERNAME
--password YOURPASSWORD
--alias all.dnsomatic.com
--dyndns_server_name updates.dnsomatic.com
--dyndns_server_url /nic/update?
As you can see, it uses www.dnsomatic.com - it's a website related to OpenDNS, so go there and check if you're not registered already. If not, do it ( I haven't got to, I think while registering on opendns.com you're also getting an account on dnsomatic.com ). Then, create a service for your OpenDNS account - remember to set up your network's label ( you may check it on https://www.opendns.com/dashboard/networks/ , it's Home by default ).
If dnsomatic says your service is not active, press ALT F2 and type in : inadyn
You won't get any message during this, so go check on dnsomatic again if it's active. You might noticed that inadyn send some information to dnsomatic and opendns about your IP, so that's the job it does. You can add inadyn to your Session as a startup app.
Sorry for littering your topic, dentaku65 - but I find this usable.
By the way, shouldn't this topic be moved to Tutorials & Tips section as a HOWTO guide?
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Quote:
Originally Posted by
andrek
As you can see, it uses
www.dnsomatic.com - it's a website related to OpenDNS, so go there and check if you're not registered already. If not, do it ( I haven't got to, I think while registering on opendns.com you're also getting an account on dnsomatic.com ). Then, create a service for your OpenDNS account - remember to set up your network's label ( you may check it on
https://www.opendns.com/dashboard/networks/ , it's Home by default ).
If dnsomatic says your service is not active, press ALT F2 and type in : inadyn
You won't get any message during this, so go check on dnsomatic again if it's active. You might noticed that inadyn send some information to dnsomatic and opendns about your IP, so that's the job it does. You can add inadyn to your Session as a startup app.
Sorry for littering your topic, dentaku65 - but I find this usable.
By the way, shouldn't this topic be moved to Tutorials & Tips section as a HOWTO guide?
Yes, I see, I did'n knew dnsomatic (and is related to no-ip too where I have an account); but if you have more than a machine in your lan you must provide an account for any machine (I think); basically this HowTo consider:
- A quick way to use OpenDNS
- Do not change Router Configuration
- Simplicity (IMHO)
This HowTO was written for the section of Tutorials but in some way did not respect all the criteria for posting there, anyway the Ubuntu Forum Staff sticked here and invited me to rewrite in the proper way for the Tutorial section.
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
Moved to Tips and Tutorials.
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env
I tried this on my laptop and everything is fine except my speed is still going the same.It starts out fast than goes down to my normal speed and sometimes even slower.I'm trying this by downloading a Xubuntu ISO from the US Mirror.
EDIT:I also tried changing the DNS in my router configuration but it still won't work.
Re: [all variants] HowTo set OpenDNS as DNS in DHCP env