-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey Ray,
Its doesn't take an expert to argue his/her point that's what this lug is all about; debating until we get the right answer. The hosts files inclusion has nothing to do with the resolv.conf setting "nameserver 127.0.0.1" The nsswitch.conf is the file that determines whether the host file is used or not. Take a look in it. The prepend option is used for dhclient and the dhclient.conf if you are using dhcp and not a static ip, which I believe you have Ray. If you were to put prepend in your resolv.conf it would just be ignored. If you were using dhclient the option would just prepend those nameservers to the resolv.conf which would keep them from being overwritten by undesirable settings. This is what Ian said he was seeking...to keep the nameservers from being overwritten. Ray it's your turn to be the guinea pig...comment out the third line in your resolv.conf(nameserver 205.171.3.25) and see if you can resolve example.com or anything on the net not listed in your hosts file. Bryan Ray Parrish wrote: | Hello, | | Thanks for your correction. I am a "far cry" from being a networking | expert. I also note in your reply to the OP that Open DNS does assign | you two name servers, so that's good. | | The one thing that did disturb me, was that the settings you show for | them involves removing 127.0.0.1 from the connection, which I'm worried | may be removing the use of your local hosts file from the equation, | which could prevent your use of it to block or redirect certain | connections at your own behest. | | I wonder if you would mind testing this theory, since you are already | using Open DNS? | | I just took a look at my resolv.conf, and it points to the router first, | then one of the domain name servers. It also consists of only the | following three lines. | | search domain.actdsltmp | nameserver 192.168.0.1 | nameserver 205.171.3.25 | | None of them contain the prepend parameter, and my system has been | utilizing the hosts file just fine, so maybe no test is needed. 8-) | | Thanks again. | | Later, Ray Parrish | | Bryan Smith wrote: | I disagree with one thing you said below | | | The router's it self's ip address is 192.168.0.1, which is a far cry | | from the correct settings for a name server. | | Most routers actually do a fine job forwarding DNS to the name servers | leased from the wan port. My resolv.conf actually has a router in it | with 192.168.1.5 as the address and it works like a charm. It's a Debian | router, but all is does is forward the requests to the appropriate name | servers. The whole point of DHCP is this in fact...to just plug and | play. After you connect to an open wireless network take a look at your | resolv.conf...it should have the access points ip there, which will | resolv hostnames correctly | | It's not a far cry from the correct setting; it's the setting that | should work(this may depend on the router). | | Bryan | | Ray Parrish wrote: | | Ian wrote: | |> I went back and forth between my Debian server and my Fedora desktop | |> and noticed some interesting things. On Fedora DNS lookups work fine | |> in elinks and every other applications except wget, unless ipv6 is | |> enabled in which case it takes exactly 20 seconds to do a DNS lookup. | |> Wget on Fedora still takes 20 seconds to do its DNS lookup even with | |> ipv6 disabled unless I explicitly use the -4 flag with it. On Debian | |> all DNS lookups take 20 seconds for me even with ipv6 disabled. The | |> resolv.conf on both boxes just has the ip of the router listed as the | |> nameserver. | |> | |> When I added OpenDNS as the first nameserver in resolve.conf, all DNS | |> lookups started working like they should in Debian and wget lookups | |> were corrected in Fedora. If I can figure out how to keep my /etc/ | |> resolv.conf from being wiped out on reboot I think everything will be | |> working correctly. | |> | |> I'm curious why OpenDNS works so much better for me than my ISPs | |> nameservers and why there is this difference in behaviour between | |> Debian and Fedora when both are setup right now as standard clients on | |> the network. | |> | |> Thanks | |> Ian | |> | | Well, one thing I notice from your post above, is that you were *not* | | using your isp's name servers, if you had your router's ip listed as the | | name server. in resolv.conf. That was very likely the cause of the slow | | look ups. | | | | If I log into my router, I get the following values for name servers - | | | | DNS Address #1: 205.171.3.25 | | DNS Address #2: 205.171.2.25 | | | | The router's it self's ip address is 192.168.0.1, which is a far cry | | from the correct settings for a name server. You seem to have found a | | solution, by setting your name server to OpenDNS, but you should | | additionally be able to call your isp, and ask them what the correct | | values are for your two default name servers. | | | | You may be getting good look up times now with only one setting to | | OpenDNS for a name server, but as they gain in popularity, it's entirely | | possible that their increasing client load will slow things down for | | you, especially as you continue to only have one correctly specified | | name server. | | | | Having a second name server correctly specified, can keep your look up | | speeds in an acceptable range, if one of the name servers slows down for | | some reason, and is likely why your isp usually points your | | configuration at two of them, instead of just one. | | | | For servers that you access on a very often basis, you can also bypass | | the DNS servers entirely, by specifying the ip addresses for those web | | sites you visit most frequently directly in your /etc/hosts file. Just | | do a whois on each server to get it's ip address, and add that ip to the | | front of a new line in your hosts file, with the corresponding domain | | name following it after a space on the same line, and you will have your | | own name server going on there, which is much quicker, at least until | | you begin to get a very, very, large hosts file which may slow things a | | little. | | | | You should be in good shape with that trick, unless one of your often | | accessed servers changes it's ip address for some reason, but for the | | most part they tend to remain at a static ip address, so that shouldn't | | be too much of a problem. | | | | Later, Ray Parrish | | | |> - -- A healthy diet includes Linux, Linux and more Linux. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknYDmAACgkQh+MLjl5SKYTHcACdGKNE37ods8M3cw36R5msi1Ms lVUAn0rbScg2323TsNVxpq3IfCmyh18Q =i4dg -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
