Kitz Forum

Internet => General Internet => Topic started by: Golfer on April 25, 2012, 03:24:25 PM

Title: DNS Servers
Post by: Golfer on April 25, 2012, 03:24:25 PM
Hi All - I trust this is the right area for my queries, please feel free to move it if not!

I've recently changed ISP to Virgin Media (all well and good - 30Mb soon to be 60Mb) and have their Superhub.  I've also ditched Windows Vista and am running Linux Mint 12.  On Vista, (ISP then was TalkTalk) my DNS server varied between Open DNS and Google.  Now, with Virgin, their own DNS server is apparently 'locked into' the hub firmware and can't be changed? 

Query 1 - is this so or is there a workaround?

Various web searches (including Virgin's site) say to configure the settings directly into my computer and this I've done -  (they appear in the config box as correct) and have followed the 'how to' instructions very carefully.  When I access the OpenDNS test page, however, the site says I'm not set up for their service! 

Query 2 - how does this software actually work?  Does the computer determine the path or the router?  And if the settings are actually 'locked' into the hub, do they override the computer's settings?

It seems that Virgin are under a lot of pressure to enable the changing of DNS servers on Superhub but it doesn't look like there will be a resolution anytime soon.  I would much prefer to use a non-ISP DNS server if possible.  Any pointers would be a great help - I'm very new to Linux, by the way, so words of one syllable would be appreciated!

Thanks in advance

Rich



Title: Re: DNS Servers
Post by: roseway on April 25, 2012, 03:35:48 PM
If you configure your computer to access your preferred DNS servers directly, the system should respect that, and DNS requests will be passed straight through the router. However, have you confirmed that the configuration changes you made in the computer have actually stuck? The reason I ask is that the DNS subsystem in Debian (and presumably Debian-based distros) changed a little while back. Previously you could edit /etc/resolvconf directly, but now if you do that it gets overwritten on the first reboot. So you have to make the change elsewhere, and I'm not sure how Mint arranges this.
Title: Re: DNS Servers
Post by: Golfer on April 26, 2012, 08:35:54 PM
If you configure your computer to access your preferred DNS servers directly, the system should respect that, and DNS requests will be passed straight through the router. However, have you confirmed that the configuration changes you made in the computer have actually stuck? The reason I ask is that the DNS subsystem in Debian (and presumably Debian-based distros) changed a little while back. Previously you could edit /etc/resolvconf directly, but now if you do that it gets overwritten on the first reboot. So you have to make the change elsewhere, and I'm not sure how Mint arranges this.

Hi Eric and thanks for the reply.

I'd hoped that it was the case as per the first part of your answer.  The second part though is proving difficult.  I've tried several methods as outlined in various forums around the net, both by configuring 'network connections' directly and through terminal.  The settings are there (and remain so after re-boot) but when I use terminal to check them, the router settings are listed 1st and 2nd and OpenDNS 3rd and 4th in the list.  Try as I might, I can't figure out how to edit the settings in terminal to move them up!  More research is required, obviously................  ;D



Title: Re: DNS Servers
Post by: Blackeagle on April 27, 2012, 10:30:46 PM
Dunno much about Linux, but, on a windows box, one would remove the DNS resolver pointing at the router.

EG, if your router is at 192.168.0.1 then generally your DNS server address would be the same as the gateway (192.168.0.1) and the router would hand on DNS queries to the resolvers it picked up from the ISP.  If however you remove that address from the DNS resolver list and add a different one, say 8.8.8.8 for google DNS, then the PC will never ask the router for a DNS query, it will instead query google DNS directly, in spite of the fact that the router has picked up the ISP's DNS settings.

As I understand it, if you edit the /etc/resolv.conf file manually then if you are using NetworkManager it will be overwritten on each boot.

This link (http://forums.linuxmint.com/viewtopic.php?f=157&t=99645&p=567694) may help.
Title: Re: DNS Servers
Post by: burakkucat on April 27, 2012, 11:17:15 PM
Blackeagle -- Someone has typed a malformed link! I wonder who it was?  ::)
Title: Re: DNS Servers
Post by: Blackeagle on April 28, 2012, 12:20:33 AM
Blackeagle -- Someone has typed a malformed link! I wonder who it was?  ::)

Oooops  :-[

Sorry, the other forum I frequent has slightly different code for the formatting of URL's.  I haz repaired it now b*cat. I'm sure your *nix experience would be most welcome here  :)
Title: Re: DNS Servers
Post by: asbokid on April 28, 2012, 12:54:20 AM
I've not used Mint, but it's Debian-based.   Linux Mint probably has the same NetworkManager applet as Debian..

(http://www3.picturepush.com/photo/a/8137641/640/Picture-Box/networkmanagerappleticon.png) (http://picturepush.com/public/8137641)

The Virgin Superhub presumably assigns both an IP address to your PC(s) and nameserver addresses.   This will be done using the DHCP protocol.

NetworkManager can be configured to obtain an IP address for the PC, but also to use hard-coded IP addresses for the nameservers.

(http://www5.picturepush.com/photo/a/8137638/640/Picture-Box/networkmanagerapplet.png) (http://picturepush.com/public/8137638)
cheers, a




Title: Re: DNS Servers
Post by: burakkucat on April 28, 2012, 01:03:06 AM
Oooops  :-[

<snip> I haz repaired it now b*cat. I'm sure your *nix experience would be most welcome here  :)

I may not actually click on a link but I'll always hover the cursor over it, just to see to which address it vectors.

Thanks for the prompt fix!  :thumbs:
Title: Re: DNS Servers
Post by: pintosal on April 28, 2012, 01:46:25 PM
Another option is to run your own DNS using the free Treewalk DNS software - good for Windows, and works for me.
Title: Re: DNS Servers
Post by: Golfer on April 30, 2012, 09:58:01 AM
Hi asbokid - thanks for that.

I do configure the network as per your screenshot and the settings remain in place after reconnect/reboot etc. However, when I access the Opendns website to test the connection, I get the Oops! message and clicking their other links shows I'm not on their service!  Frankly, I'm stumped.............

Rich
Title: Re: DNS Servers
Post by: geep on April 30, 2012, 12:18:24 PM
Hi,
On my Slackware Linux the contents of /etc/resolv.conf list the nameserver(s).
It is refreshed at every boot.
By default mine contains:
Code: [Select]
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
nameserver 192.168.1.254
# /etc/resolv.conf.tail can replace this line

So my default nameserver is my router @ 192.168.1.254

Just to confuse - I actually modify my /etc/resolv.conf at boot using rc.local.
I update it with other nameservers in a priority order, so that it ends up with:
Code: [Select]
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search lan
nameserver 127.0.0.1
nameserver 94.30.127.100
nameserver 89.145.254.78
nameserver 192.168.1.254
# /etc/resolv.conf.tail can replace this line

I'm running dnsmasq locally - also started up via rc.local, so I have a local cacheing nameserver on localhost 127.0.0.1 (if my memory serves me correctly - it was setup ages ago).
I have
Code: [Select]
dnsmasq -o start in my rc.local to start my local nameserver after updating the resolv.conf

References (lots more on similar topic if you Google...):
http://www.cyberciti.biz/tips/how-do-i-improve-dns-performance-on-linuxwindows-desktop.html
http://www.debianadmin.com/local-dns-cache-for-faster-browsing-on-ubuntu-system.html

Although I did this setup on Linux, I ran a benchnark using this tool:
http://www.grc.com/dns/benchmark.htm
running on a Windows Virtual Machine. I could see that after the first access to a URL, subsequent accesses were indeed faster.
The cache of dnsmasq is refreshed at every boot.

dig is an interesting tool for looking at dns performance.
Here's an example of the cacheing in operation when I went to povray.org:
This is the first visit to povray.org today - dns lookup pretty slow:
Quote
dig povray.org   

; <<>> DiG 9.7.4-P1 <<>> povray.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4507
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;povray.org.                    IN      A

;; ANSWER SECTION:
povray.org.             3600    IN      A       203.29.75.48

;; AUTHORITY SECTION:
povray.org.             414     IN      NS      ns1.povray.org.
povray.org.             414     IN      NS      ns1.aussie.org.

;; Query time: 2099 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 30 12:06:46 2012
;; MSG SIZE  rcvd: 87

On subsequent visits to povray.org - dns lookup is instant thanks to the cache:
Quote
dig povray.org

; <<>> DiG 9.7.4-P1 <<>> povray.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15118
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;povray.org.                    IN      A

;; ANSWER SECTION:
povray.org.             3596    IN      A       203.29.75.48

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 30 12:06:50 2012
;; MSG SIZE  rcvd: 44

Oh, and welcome to Linux...

Cheers,
Peter





Title: Re: DNS Servers
Post by: asbokid on May 02, 2012, 02:05:05 AM
Hi asbokid - thanks for that.

I do configure the network as per your screenshot and the settings remain in place after reconnect/reboot etc. However, when I access the Opendns website to test the connection, I get the Oops! message and clicking their other links shows I'm not on their service!  Frankly, I'm stumped.............

Rich

What is the contents of your /etc/resolve.conf file?  Sometimes it is just a symlink to another file..

Maybe run netstat in one console window, and then ping anyoldsillysitename.com from another window..

Code: [Select]
$ ping hubblelkdfjsddskfjsddfg.com
ping: unknown host hubblelkdfjsddskfjsddfg.com

And from the other console we can see the udp/53 connection to the nameserver with IP address 8.8.8.8 (as configured in /etc/resolv.conf)..

Code: [Select]
$ sudo netstat -nucp
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 192.168.1.2:60078       8.8.8.8:53              ESTABLISHED 10899/ping     

cheers, a
Title: Re: DNS Servers
Post by: Golfer on May 02, 2012, 11:36:56 AM
This reply to peter and asbokid - thanks again for your help

When I try to open   /etc/resolve.conf in Terminal I get this, which suggests my system might not be configured correctly -

~ $ /etc/resolve.conf
bash: /etc/resolve.conf: No such file or directory
richard@xxxxxxxxx ~ $ sudo /etc/resolve.conf
[sudo] password for richard:
sudo: /etc/resolve.conf: command not found

Trying the other commands either produce a similar result or a string of data I don't comprehend!  I don't fully understand what it is I'm doing or looking for (in my defense I'm a very new newbie! :baby:).  Does this mean that certain files are missing and I should install them - if so, where from and how?

Can you recommend a good, basic beginners guide to using Terminal?
Title: Re: DNS Servers
Post by: asbokid on May 02, 2012, 02:27:54 PM
This reply to peter and asbokid - thanks again for your help

When I try to open   /etc/resolve.conf in Terminal I get this, which suggests my system might not be configured correctly -

~ $ /etc/resolve.conf
bash: /etc/resolve.conf: No such file or directory
richard@xxxxxxxxx ~ $ sudo /etc/resolve.conf
[sudo] password for richard:
sudo: /etc/resolve.conf: command not found

My bad!  It's /etc/resolv.conf (no 'e' on the end). It's just a text file rather than a program to run, so load it with a text editor (e.g. gedit)

Code: [Select]
$ gedit /etc/resolv.conf

Quote
Can you recommend a good, basic beginners guide to using Terminal?

The terminal is called the 'shell'.. There are loads of shells to choose from in Linux/Unix. The most popular shell is called the bash shell, or the "Bourne Again SHell".

The first thing you notice is how much more powerful bash is than the poor old command.com shell that Microsoft ships with Windows.

Fairly complex programs called 'shell scripts' are written to run in Unix shells.  There are some programmers who are employed solely to write Unix shell scripts!

The official bash manual is here [1]  There are other bash manuals: the Bash Guide for Beginners from Machtelt Garrels looks good. [2]

cheers, a

[1] http://www.gnu.org/software/bash/manual/
[2] http://writers.fultus.com/garrels/ebooks/Machtelt_Garrels_Bash_Guide_for_Beginners_2nd_Ed.pdf
Title: Re: DNS Servers
Post by: Golfer on May 02, 2012, 08:49:26 PM
My bad!  It's /etc/resolv.conf (no 'e' on the end). It's just a text file rather than a program to run, so load it with a text editor (e.g. gedit)

My eyesight!  I didn't pick up the correct spelling in your screenshot!

I edited and saved resolv.conf then restarted but on checking it had placed the router DNS addresses above mine in the list.  Thus -

nameserver 127.0.0.1
nameserver 194.168.4.100
nameserver 194.168.8.100
nameserver 208.67.222.222
nameserver 208.67.220.220

The 1st line seems correct, the 2nd and 3rd are the Virgin nameservers.  The final 2 are opendns, which is what I want.

Peter's reply in the post below yours is beyond me at this stage - sorry Peter!   :no:  I'll don my student cap and have a thorough read-up in the links you posted.  Don't go away.....................

Thanks again

Rich

Title: Re: DNS Servers
Post by: Golfer on May 02, 2012, 09:00:37 PM
$ ping hubblelkdfjsddskfjsddfg.com
ping: unknown host hubblelkdfjsddskfjsddfg.com
[/code]

And from the other console we can see the udp/53 connection to the nameserver with IP address 8.8.8.8 (as configured in /etc/resolv.conf)..

Code: [Select]
$ sudo netstat -nucp
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 192.168.1.2:60078       8.8.8.8:53              ESTABLISHED 10899/ping     

cheers, a
[/quote]

When I run sudo netstat -nucp - I get this

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State

and it continues to run until I kill the process   
Title: Re: DNS Servers
Post by: asbokid on May 02, 2012, 09:21:06 PM
My bad!  It's /etc/resolv.conf (no 'e' on the end). It's just a text file rather than a program to run, so load it with a text editor (e.g. gedit)

My eyesight!  I didn't pick up the correct spelling in your screenshot!

I edited and saved resolv.conf then restarted but on checking it had placed the router DNS addresses above mine in the list.  Thus -

Code: [Select]
nameserver 127.0.0.1
nameserver 194.168.4.100
nameserver 194.168.8.100
nameserver 208.67.222.222
nameserver 208.67.220.220

The 1st line seems correct, the 2nd and 3rd are the Virgin nameservers.  The final 2 are opendns, which is what I want.

Hang on... the first line suggests that there's a DNS server (bind, dnsmasq, etc..) running on your PC, listening on 127.0.0.1 for hostname lookups.. That is exactly what Peter has set-up.

Is that the case?  The netstat tool should indicate whether there is a DNS server running on your PC and listening for local connections on udp/53.    It's not usual to run a local DNS server on a PC.  Maybe that is the standard configuration for Linux Mint, though?

You mention that you "restarted", and the Virgin nameservers were inserted in /etc/resolv.conf after that..    How did you perform that "restart"? What sort of restart was it?

Something is still retrieving the nameserver IP addresses from your Virgin router.  Thinking back to the bad old days of dialup, those nameserver identities can also be provided during the ppp handshake as well as by DHCP.  Two places to check..

cheers, a
Title: Re: DNS Servers
Post by: Blackeagle on May 02, 2012, 10:30:23 PM
No idea how to do this in Linux, although Asbo and b*cat will both know, but if that was happening in Windows, I'd write a batch file to run at startup (after your /etc/resolv.conf is re-written) to re-write it with my wanted DNS server addresses.  I think peter alluded that this is what he does, to alter the order of them.

I know the order of running things at startup in a Win environment so I'd set it to run as the last thing, and then get the contents of the file, copy the first line to a temporary file, copy the next two lines to a  second temporary file, copy the next two lines to a 3rd temporary file, delete the original, then echo the first temp file to the new file, then the third and then the second.  This would re-write the file with the nameservers in the correct order for you.

There is probably some fancy 'grep' and piping combination that can do this in one line.

Your other option is to find the code that gets the nameservers from the router and disable it, so that just the openDNS servers are included.
Title: Re: DNS Servers
Post by: burakkucat on May 03, 2012, 01:44:22 AM
Of course if it was a vanilla modem/router, as distinct to one molested/violated by the ISP, I would advise setting the modem/router to hand out the IP addresses of the DNS servers which were desired to be used. Then all systems on the LAN just need to use the modem/router's LAN address for the DNS server.  :-X
Title: Re: DNS Servers
Post by: Golfer on May 03, 2012, 08:46:03 AM
Hang on... the first line suggests that there's a DNS server (bind, dnsmasq, etc..) running on your PC, listening on 127.0.0.1 for hostname lookups.. That is exactly what Peter has set-up.

Is that the case?  The netstat tool should indicate whether there is a DNS server running on your PC and listening for local connections on udp/53.    It's not usual to run a local DNS server on a PC.  Maybe that is the standard configuration for Linux Mint, though?

It may well be that I've set something up without knowing it as I've tried all manner of 'solutions' thus far!

You mention that you "restarted", and the Virgin nameservers were inserted in /etc/resolv.conf after that..    How did you perform that "restart"? What sort of restart was it?

A full shut-down and restart

Something is still retrieving the nameserver IP addresses from your Virgin router.  Thinking back to the bad old days of dialup, those nameserver identities can also be provided during the ppp handshake as well as by DHCP.  Two places to check..

Ok, but where?  In the computer or in the router?

cheers, a
[/quote]
Title: Re: DNS Servers
Post by: Golfer on May 03, 2012, 09:04:34 AM
Of course if it was a vanilla modem/router, as distinct to one molested/violated by the ISP, I would advise setting the modem/router to hand out the IP addresses of the DNS servers which were desired to be used. Then all systems on the LAN just need to use the modem/router's LAN address for the DNS server.  :-X

That's it in a nutshell!  Until recently I was with TalkTalk (shiver) and with their router it was a simple matter to change the DNS addresses, save and continue.  Virgin have arbitrarily decided to lock their router to their own DNS servers and deny user access to those settings. There is quite a row brewing over this as we speak.  I'm advised that, under normal circumstances, setting DNS in the computer's network config should override the router settings but for some reason, this is not the case.  I'm sure it is nothing more than my inexperience.  I feel a bit like a blind man groping about in a strange house, in the dark, with welding gloves on............... ;D
Title: Re: DNS Servers
Post by: burakkucat on May 03, 2012, 04:24:47 PM
b*cat nods his head, with a sad expression on his face.  :(

Far too many ISPs / CPs assume that they know best . . . 'nough said.  :-X

As for "with TalkTalk (shiver)", Black Eagle, Asbokid and I are known users of that ISP / CP. As end-users with adequate knowledge of "what's what", we are content with what we are provided by TT.  :-\

It seems, to me, that you current issue is down to uncertainty with the Linux Mint distribution. Yes, the correct configuration of each system connected to your LAN can override the use of the modem/router as your local DNS server.
Title: Re: DNS Servers
Post by: asbokid on May 03, 2012, 05:18:03 PM
Quote
Something is still retrieving the nameserver IP addresses from your Virgin router.  Thinking back to the bad old days of dialup, those nameserver identities can also be provided during the ppp handshake as well as by DHCP.  Two places to check..
Ok, but where?  In the computer or in the router?

On the computer. Software running on your computer is modifying the /etc/resolv.conf list of nameservers.

The order of the nameserver entries in that configuration file is important.  The first nameserver in the list is queried first for hostname resolution. If that query is unsuccessful, the next nameserver in the list is queried, and so on..

The first entry in your resolv.conf file is nameserver 127.0.0.1. That suggests a nameserver may be running on the PC itself.

The netstat tool will indicate if that is so..

Code: [Select]
$ sudo netstat -nlup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:68              0.0.0.0:*                           13422/dhclient 
udp        0      0 0.0.0.0:51413           0.0.0.0:*                           20322/transmission-
udp        0      0 0.0.0.0:631             0.0.0.0:*                           1516/cupsd     
udp        0      0 0.0.0.0:43682           0.0.0.0:*                           20322/transmission-

We can see that no DNS server is running on this machine..  If there had been a nameserver running, then a entry like this would be shown by netstat:

Code: [Select]
$ sudo netstat -nlup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:53              0.0.0.0:*                           12345/adnsserver 

What does this netstat command return on your machine:

Code: [Select]
$ sudo netstat -nlup

cheers, a
Title: Re: DNS Servers
Post by: Golfer on May 03, 2012, 10:17:20 PM
Hi asbokid - the output is  -

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:53              0.0.0.0:*                           1172/dnsmasq   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           9977/dhclient   
udp        0      0 0.0.0.0:41573           0.0.0.0:*                           874/avahi-daemon: r
udp        0      0 192.168.0.255:137       0.0.0.0:*                           1378/nmbd       
udp        0      0 192.168.0.2:137         0.0.0.0:*                           1378/nmbd       
udp        0      0 0.0.0.0:137             0.0.0.0:*                           1378/nmbd       
udp        0      0 192.168.0.255:138       0.0.0.0:*                           1378/nmbd       
udp        0      0 192.168.0.2:138         0.0.0.0:*                           1378/nmbd       
udp        0      0 0.0.0.0:138             0.0.0.0:*                           1378/nmbd       
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           874/avahi-daemon: r
udp6       0      0 :::53                   :::*                                1172/dnsmasq   
udp6       0      0 :::5353                 :::*                                874/avahi-daemon: r
udp6       0      0 :::35076                :::*                                874/avahi-daemon: r

I see from the first line that dnsmasq is listed.  I installed that as part of my feeble attempts to resolve this issue but truthfully, I've no idea what it does or whether I've configured it correctly!
Title: Re: DNS Servers
Post by: Golfer on May 03, 2012, 10:22:54 PM
b*cat

As for "with TalkTalk (shiver)", Black Eagle, Asbokid and I are known users of that ISP / CP. As end-users with adequate knowledge of "what's what", we are content with what we are provided by TT.  :-\

And very good too!  Unfortunately, my experience with TT was a little different.............. ::)

It seems, to me, that you current issue is down to uncertainty with the Linux Mint distribution. Yes, the correct configuration of each system connected to your LAN can override the use of the modem/router as your local DNS server.

I can only refer you to my previous statement....'I'm sure it is nothing more than my inexperience.  I feel a bit like a blind man etc etc........
Title: Re: DNS Servers
Post by: asbokid on May 03, 2012, 11:18:30 PM
Hi asbokid - the output is  -

Code: [Select]
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:53              0.0.0.0:*                           1172/dnsmasq 
 

I see from the first line that dnsmasq is listed.  I installed that as part of my feeble attempts to resolve this issue but truthfully, I've no idea what it does or whether I've configured it correctly!

So name resolution is currently being handled by dnsmasq..  But dnsmasq simply caches the results of previous hostname queries, queries which it has proxied to Virgin's nameservers..

If you manually edit /etc/resolv.conf and place your chosen nameserver at the top of the list in that file, it should solve the problem at least temporarily.   Maybe you could test that first by re-visiting the opendns checking tool with your browser.

Unless you definitely want DNS caching, maybe remove dnsmasq too.

Code: [Select]
$ sudo apt-get remove dnsmasq

How are you starting and stopping networking? 

Are you using the NetworkManager applet on the taskbar, as discussed above?

When the NetworkManager was used to edit the connection settings to add those OpenDNS name server addresses, were those modifications made to the correct connection listed under "Wired" connections?

Maybe check again.

Right click the NetworkManager icon on the taskbar. Go down to "Edit Connections...". a pop-up window appears. Select "Wired" and the connection you want to edit. That connection is labelled "Wired connection 1" on this PC.  Then click Edit.

The applet has "Connect Automatically" checked as well as "Available to all users". and under "IPv4 Settings", the pull-down "Method" menu has the following list:

Code: [Select]
Automatic (DHCP)
Automatic (DHCP) addresses only   <----
Manual
Link-Local Only
Shared to other computers
Disabled

Select "Automatic (DHCP) Addresses Only" under IPv4 Settings. Maybe also check that there isn't a conflicting nameserver option configured under "IPv6 Settings".

Then enter the DNS servers you want:  e.g. 208.67.222.222, 208.67.222.220

(http://www1.picturepush.com/photo/a/8180499/oimg/Picture-Box/Screenshot-from-2012-05-03-23%3A09%3A05.png) (http://picturepush.com/public/8180499)

Click 'Save' and 'Close' the NetworkManager applet window.

Now Left Click on the NetworkManager taskbar icon and left click 'Wired Network | Disconnect'.

From a shell type the following command and note that the output is the same as below.  It shows that no nameserver is configured (because the network is down).

Code: [Select]
$ cat /etc/resolv.conf
# Generated by NetworkManager

Now Left Click again on the NetworkManager applet.  Left click 'Wired connection 1' to bring the connection back up again. Wait until the DHCP server on the Virgin router has done its stuff (the spinny icon thingy on the taskbar has stopped spinning).

From a shell run the following command again and hopefully you should see this output.

Code: [Select]
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 208.67.222.222
nameserver 208.67.222.220

Again, check by visiting http://www.opendns.com/welcome/  that it is configured correctly..

(http://www2.picturepush.com/photo/a/8180500/oimg/Picture-Box/Screenshot-from-2012-05-03-23%3A09%3A49.png) (http://picturepush.com/public/8180500)

cheers, a
Title: Re: DNS Servers
Post by: Golfer on May 04, 2012, 09:50:26 PM

Unless you definitely want DNS caching, maybe remove dnsmasq too.      Done

How are you starting and stopping networking?    Via network applet - left click, disconnect/reconnect as appropriate

When the Network Manager was used to edit the connection settings to add those OpenDNS name server addresses, were those modifications made to the correct connection listed under "Wired" connections?     Yes.  In fact I set up 'wired 1' and 'wired 2'.  I changed #2 to the opendns settings and #1 to the same as the router.  I did this as a precaution in case I messed up; this way I knew I'd still have internet access on one of them.  But here's the thing - I also tried leaving #2 blank, saved, disconned and reconned #2 but still connected ok!  Which suggests the applet is having no effect whatsoever?

Select "Automatic (DHCP) Addresses Only" under IPv4 Settings. Maybe also check that there isn't a conflicting nameserver option configured under "IPv6 Settings".   Done, and no IPv6 options.

Then enter the DNS servers you want:  e.g. 208.67.222.222, 208.67.222.220  Done

Click 'Save' and 'Close' the NetworkManager applet window.    Done

Now Left Click on the NetworkManager taskbar icon and left click 'Wired Network | Disconnect'.   Done - on #1 in this instance

From a shell type the following command and note that the output is the same as below.  It shows that no nameserver is configured (because the network is down).   
But I get this!   
# Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100

Now Left Click again on the NetworkManager applet.  Left click 'Wired connection 1' to bring the connection back up again. Wait until the DHCP server on the Virgin router has done its stuff (the spinny icon thingy on the taskbar has stopped spinning).   Done

From a shell run the following command again and hopefully you should see this output.
Code: [Select]
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 208.67.222.222
nameserver 208.67.222.220

And then this!
# Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100
nameserver 208.67.222.222
nameserver 208.67.220.220

I've also tried deleting 'wired 2' in case of a possible conflict but this has no effect.  Ditto DNS flush of the browser.  But, when I try to flush the DNS from the computer, I get this

/etc/rc.d/init.d/nscd restart
 
bash: /etc/rc.d/init.d/nscd: No such file or directory
sudo /etc/rc.d/init.d/nscd restart
[sudo] password for xxxxx:
sudo: /etc/rc.d/init.d/nscd: command not found

Is it possible that this might have a bearing?  and thanks again for the time and effort you are putting into this!

Rich

Edit:   I found how to install /etc/rc.d/init.d/nscd : ran it but still same!
Edit 2: I also spotted that, in your screenshot of 'iPv4 connections', the box for 'Require iPv4 addressing.............etc' is left unchecked.  Is this the case or an omission?

 
Title: Re: DNS Servers
Post by: asbokid on May 04, 2012, 10:38:37 PM
I set up 'wired 1' and 'wired 2'.  I changed #2 to the opendns settings and #1 to the same as the router.  I did this as a precaution in case I messed up; this way I knew I'd still have internet access on one of them.  But here's the thing - I also tried leaving #2 blank, saved, disconned and reconned #2 but still connected ok!  Which suggests the applet is having no effect whatsoever?

Ahh. At a guess, maybe that's because "Wired 1" was configured to auto-reconnect, even though you selected the "Wired 2" connection.

Quote
But I get this!   
Code: [Select]
# Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100
...
And then this!
Code: [Select]
# Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100
nameserver 208.67.222.222
nameserver 208.67.220.220

Aha! There's the clue...

Your Linux Mint installation is using a nameserver manager called resolvconf in addition to the NetworkManager applet..

So there are two conflicting tools simultaneously configuring the same options!

I've never even heard of the tool called resolvconf but the manpage for it is here..

http://manpages.ubuntu.com/manpages/karmic/man8/resolvconf.8.html

It looks like you've got a few options to sort it out..

a) Disable resolvconf at boot time. See the update-rc.d and the chkconfig tools to do that; or
b) Uninstall resolvconf altogether (with sudo apt-get remove resolvconf); or
c) Edit the /etc/network/interfaces configuration file as per the info in that manpage for resolvconf

Maybe go for c).. since it's easily reversible..

Code: [Select]
$ gedit /etc/network/interfaces

And now add a # to the beginning of the line in /etc/networks/interfaces that reads..

Code: [Select]
dns-nameservers 194.168.4.100 194.168.8.100

So that it reads as follows (the # is a comment character that disables the commands on a line)

Code: [Select]
#dns-nameservers 194.168.4.100 194.168.8.100

EDIT:

If you find that the file /etc/networks/interfaces does not contain that reference to Virgin's nameservers, then you may have to look for those nameserver references in the other configuration files used by resolvconf.

According to the manpage for resolvconf those other files are:

/etc/resolvconf/resolv.conf.d/base and
/etc/resolvconf/resolv.conf.d/head

Stop and re-start the network interface by left clicking on 'Wired 1' under the NetworkManager icon..

Check again with:

Code: [Select]
$ cat /etc/resolv.conf


Hopefully that's it?!

cheers, a

Quote
Edit:   I found how to install /etc/rc.d/init.d/nscd : ran it but still same!

You might want to remove that also!
Title: Re: DNS Servers
Post by: Golfer on May 05, 2012, 09:37:08 AM
Hi asbokid - thanks for your patience!  This is now getting weird! 

"Your Linux Mint installation is using a nameserver manager called resolvconf in addition to the NetworkManager applet.. "

sudo apt-get remove resolvconf
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package resolvconf is not installed, so not removed  Er, what?
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.

gedit /etc/network/interfaces  Gives me
auto lo
iface lo inet loopback  ?  Looking through the listed files for resolvconf gives me this -

#!/bin/sh
# ifdown hook script for resolvconf
# Written by Roy Marples <roy@marples.name> under the BSD-2 license

[ -x /sbin/resolvconf ] || exit 0
case "$ADDRFAM" in
   inet|inet6) : ;;
   *) exit 0;;
esac
[ "$METHOD" = dhcp ] && /sbin/resolvconf -f -d "$IFACE"
/sbin/resolvconf -f -d "$IFACE.$ADDRFAM"  And then.....................

 /etc/resolvconf/resolv.conf.d/base
bash: /etc/resolvconf/resolv.conf.d/base: No such file or directory   And......

cat /etc/resolv.conf
Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100
nameserver 208.67.222.222
nameserver 208.67.220.220   !!!!!!!!!!!

These entries are listed as read only so, not only do they not exist, I can't edit them either.........

.........now looking for a darkened room to lie down in......... :'(











Title: Re: DNS Servers
Post by: Golfer on May 05, 2012, 11:49:23 AM
Notwithstanding all of the above..............................and in frustration.................

I returned (again) to the VM Superhub settings page and tried (again) to reset the dns addresses using static rather than dynamic.  (I'd had several previous attempts with no success - even having 'access denied' to the internet).  However, this time it worked!  Dns addresses as entered and access to openDNS successful!   (Please don't ask me how or why, I won't be able to tell you!) :D

One (or two) more questions, if you can bear it ........................!! :no:

I understand the difference between static and dynamic addresses but will having a static address have any effect whatsoever on what I do on the 'net?  Can I keep that setting forever or will there come a time when it will need to change it?  Is internet security compromised in any way?

I can't thank all of you enough for your help - and there's a pint waiting on the bar at my local..................... ;)

Rich

Title: Re: DNS Servers
Post by: geep on May 06, 2012, 06:42:14 PM
Hi again,
Now I'm a bit mystified as to why you've had so many problems getting to use OpenDNS. So much so that I made a Mint 12 (32 bit) installation under VirtualBox. The initial installation showed 192.168.1.254 as the DNS. That's what I expected as that's my router.
resolv.conf was:
Code: [Select]
# Generated by NetworkManager
nameserver 192.168.1.254
I then changed the DNS servers to 208.67.222.222, 208.67.222.220 using the "Editing Wired connection 1" popup as shown on asbokid's post.
resolv.conf had changed to:
Code: [Select]
# Generated by NetworkManager
nameserver 208.67.222.222
nameserver 208.67.220.220
Then I went to http://www.opendns/welcome and got "Welcome to OpenDNS".
Elapsed time for all that was about 30 mins, not counting Mint download time; and I was doing something else for most of the time, too!
Maybe it's worth thinking about doing a complete reinstall of Mint as something in your system seems a bit misconfigured. Wipe the disk and start again. It wouldn't take too long.
Cheers,
Peter
Title: Re: DNS Servers
Post by: Golfer on May 06, 2012, 09:24:06 PM
Hi again,
Now I'm a bit mystified as to why you've had so many problems getting to use OpenDNS.  Not as much as I am!

So much so that I made a Mint 12 (32 bit) installation under VirtualBox.   Wow! Above and beyond the call of duty I'd say!

The initial installation showed 192.168.1.254 as the DNS. That's what I expected as that's my router.
resolv.conf was:
Code: [Select]
# Generated by NetworkManager
nameserver 192.168.1.254
I then changed the DNS servers to 208.67.222.222, 208.67.222.220 using the "Editing Wired connection 1" popup as shown on asbokid's post.
resolv.conf had changed to:
Code: [Select]
# Generated by NetworkManager
nameserver 208.67.222.222
nameserver 208.67.220.220
     As you can see from the previous posts, my results were different from those expected!  Resov.conf produced the info but when I went back to check, system said it wasn't installed!

Elapsed time for all that was about 30 mins, not counting Mint download time; and I was doing something else for most of the time, too!
Maybe it's worth thinking about doing a complete reinstall of Mint as something in your system seems a bit misconfigured. Wipe the disk and start again. It wouldn't take too long.   That's something I'd considered and I may yet do, but for now (after all the messing about) I'll let things run a while and see what occurs!
Cheers,
Peter

Regards

Rich
Title: Re: DNS Servers
Post by: asbokid on May 07, 2012, 12:10:06 AM
/sbin/resolvconf (the binary) was probably installed automatically as a dependency of another package you installed.. e.g. nscd or dnsmasq.

Whilst the main package, e.g. dnsmasq may have been removed, sometimes the files from a dependent package, e.g. resolvconf, remain.

EDIT: It looks like that is what happened when you installed dnsmasqresolvconf is listed as a "suggested package" to install with it..

It seems that resolvconf is provided by two different Debian packages.. one package is called resolvconf and another is called openresolv.

Since resolvconf (the package) is not installed on golfer's machine, the finger of suspicion points also at the other package, openresolv.

All a bit academic now. Glad you got it sorted. The Linux Mint forum might be a better place for these questions.

cheers, a
Title: Re: DNS Servers
Post by: Golfer on May 07, 2012, 10:19:05 AM
/sbin/resolvconf (the binary) was probably installed automatically as a dependency of another package you installed.. e.g. nscd or dnsmasq.

Whilst the main package, e.g. dnsmasq may have been removed, sometimes the files from a dependent package, e.g. resolvconf, remain.

EDIT: It looks like that is what happened when you installed dnsmasqresolvconf is listed as a "suggested package" to install with it..

It seems that resolvconf is provided by two different Debian packages.. one package is called resolvconf and another is called openresolv.

Since resolvconf (the package) is not installed on golfer's machine, the finger of suspicion points also at the other package, openresolv.

All a bit academic now. Glad you got it sorted. The Linux Mint forum might be a better place for these questions.

cheers, a

Hi again..............just when you thought I'd gone away.................... ::)   As you may see from my reply to Peter on the post "static ip address and virgin media", things didn't quite work out so I'm basically back where I started!  I'll keep having a tinker and see if I can get the files you quoted removed.  If not, then a re-install looks the best bet.

I've posted a few times on the Mint forum (US one) but the replies are few and often take a long time.  The Linux UK site, I believe, has had some issues and has had to be re-set, losing a lot of information.

Rich

Asbokid, you're definitely a genius and the pint is yours!  I removed completely resolv.conf through package manger and my connection settings worked immediately.  Openresolv had not been installed.

Funny how some things are simple innit..............but only when you know how!

Thanks again

Rich
Title: Re: DNS Servers
Post by: kitz on May 07, 2012, 02:18:02 PM
Quote
Asbokid, you're definitely a genius and the pint is yours!  I removed completely resolv.conf through package manger and my connection settings worked immediately.  Openresolv had not been installed.

Funny how some things are simple innit..............but only when you know how!

 :thumbs: