You are not logged in.
Hi, for some reason I'm using my ISP's dns, even though I've specified otherwise in wicd.
From what I can read, it might be that dhcpd is getting the addresses over dhcp and writing them to /etc/resolv.conf.
Any takes on what I can do about this?
Optimally, the settings in wicd should count, but I'll settle for configuring dhcp or resolv.conf if those are the options.
EDIT: I hope I'm posting in the right sub forum?
Last edited by Bladtman242 (2012-07-07 18:22:23)
Offline
Hi, for some reason I'm using my ISP's dns, even though I've specified otherwise in wicd.
From what I can read, it might be that dhcpd is getting the addresses over dhcp and writing them to /etc/resolv.conf.
Any takes on what I can do about this?
Optimally, the settings in wicd should count, but I'll settle for configuring dhcp or resolv.conf if those are the options.EDIT: I hope I'm posting in the right sub forum?
can you please post your /etc/rc.conf file in code tags?
thanks
Arch - LVM - ext4 - gnome (T60p 14.1 1400p x86_64), (T60 15 flexview 1400p i686)
Offline
Try removing "domain_name_servers" from the option declaration in /etc/dhcpcd.conf. If it's still getting overwritten, you can add your DNS servers manually to /etc/resolv.conf.tail or check the dhcpcd.conf manpage for the "static" option, e.g.:
static domain_name_servers=192.168.1.1(This assumes you're running dhcpcd, of course.)
Last edited by Zancarius (2012-07-07 18:08:49)
He who has no .plan has small finger.
~Confucius on UNIX.
Offline
Stevepa: resolv.conf just contained my ISP's name server adresses.
Zancarius: removing the domain_name_servers options did the trick.
Now wicd decides.
Thanks a lot, both of you ![]()
Offline
For completeness:
removing the option only helped until next reboot.
apparently the
domain_name_servers requests the DNS addresses over dhcp, but removing the option does not prevent the addresses from being used when they are still supplied by the dhcp server.
In order to ignore them, even when they are supplied, use
noption domain_name_serversAt least that works for me ![]()
Last edited by Bladtman242 (2012-07-13 12:26:15)
Offline
For completeness:
removing the option only helped until next reboot.
apparently thedomain_name_serversrequests the DNS addresses over dhcp, but removing the option does not prevent the addresses from being used when they are still supplied by the dhcp server.
In order to ignore them, even when they are supplied, usenoption domain_name_serversAt least that works for me
So... you want to prevent dhcpcd from overwriting /etc/resolv.conf, correct? Why not just add "nohook resolv.conf" to /etc/dhcpcd.conf. This way dhcpcd still will request all standard info from the router, but won't commit it to resolv.conf. From the manpage:
nohook script
Don't run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .sh.
So to stop dhcpcd from touching your DNS or MTU settings you would do:-
nohook resolv.conf, mtuArch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
What would the difference be exactly? ![]()
Offline
Removing domain_name_servers (or using noption) prevents it from pulling the info via DHCP.
Removing the hook via nohook is the cleaner solution because it prevents the hook that overwrites resolv.conf from running (but still receives the configuration from the DHCP server).
He who has no .plan has small finger.
~Confucius on UNIX.
Offline
I see.
Is the information needed for something else, or why is it cleaner?
I'm not trying to argue, I just want to understand ![]()
Offline
Exactly.
At some point I figured that using DNS from various public (like hotel) networks is not too secure. So I configured dhcpcd, put Google public DNS (you can use Comodo SecureDNS, OpenDNS -- depending on your bias toward security or speed) into resolv.conf, and made the entire / read-only. Another reason is this whole story about minimizing writes to /etc...
Although I use netcfg, I don't see why you have to set DNS from wicd as opposed to editing resolv.conf directly.
EDIT: With the "nooption... " way, dhcpcd still writes to /etc/resolv.conf. However, these writes are empty -- it simply overwrites the file with an empty one. When using "nohook..." dhcpcd does not touch resolv.conf at all. I'm on wifi ATM, but:
-bluemoon-13:15-~$ ll /etc/resolv.conf
-rw-r--r-- 1 root root 59 Jan 3 2012 /etc/resolv.confnote the timestamp... Hope this helps ![]()
Last edited by Leonid.I (2012-07-13 18:56:18)
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
What on gods green earth..
Even with noption, dhcpcd writes my isp's dns adresses into resolv.conf.
I'm trying nohook now.
Leonid.I: I'd like wicd to handle it because it allows for different profiles for different networks, without needing to change resolv.conf manually ![]()
Isn't it a bit strange that dhcpcd still overwrites resolv.conf with my ISP's adresses, when yours simply writes out an empty file?
Offline
What on gods green earth..
Even with noption, dhcpcd writes my isp's dns adresses into resolv.conf.
I'm trying nohook now.
It is nooption with three o.
Leonid.I: I'd like wicd to handle it because it allows for different profiles for different networks, without needing to change resolv.conf manually
Isn't it a bit strange that dhcpcd still overwrites resolv.conf with my ISP's adresses, when yours simply writes out an empty file?
Why do you want to change DNS servers for different network? How do you decide which ones to use with a given network? A fixed set of nameservers will work just fine...
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
It is nooption with three o.
Ahh, I guess the missing 'o' would explain it.
Why do you want to change dns servers for different network? How do you decide which ones to use with a given network? A fixed set of nameservers will work just fine...
Well, like you said yourself; there are different reasons to choose different dns providers.
As I carry my laptop with me, my preferences might change for each network.
At home there are a couple of websites my isp blocks, so I use googles dns instead.
At campus that doesn't matter, but speed and security might.
At work I need to use the local dns, as they provide some local-only services.
I will admit I have not given it much thought. I just did a dns speed test at home and picked the fastest that did not block the sites I use.
Is there some reason I should not have different profiles for dns?
If its a small inconvenience to set up, and it obviates the need for manually editing resolv.conf all the time, it seems like a win/win ![]()
Offline
I agree that editing resolv.conf all the time is a PITA
But if you switch DNS depending on the network, wouldn't it be better to let the DHCP protocol to hadle that automatically? Or else, why this can't work:
nameserver x.x.x.x
nameserver x.x.y.y
...
nameserver 10.10.10.1so the last nameserver will catch local services, no?
The issue of DNS security is a bit exaggerated IMHO: noone uses DNSSec, and the remaining attack vectors are hacked DNS servers (which is unlikely with google/comodo/your ISP) or router (more likely). The latter was my motivation to not use DNS servers provided by the DHCP.
The speed also depeds on many variables. Most public DNS servers cache, so "dig" is slow only 1st time, and then gives me 25-45 ms lookup time on all sites. ISP's DNS are different because they optimize -- microsoft.com will always load much faster than debian.org (for comcast it is 15ms vs ~170ms).
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Or else, why this can't work:
I guess that would work ![]()
But now that it is set up, I still don't see why the profiles are a bad thing? Again, not really arguing, just trying to understand what I currently do not.
Using the dhcp-supplied dns is not an option because they are usually not the name servers I want to use.
ISP's are required by law to block certain pages on dns level here, but it is handled most unprofessionally.
A few weeks back they accidentally dumped 10.000 sites in the filter, including some of google's services. Unacceptable.
I realise the dns speed is hard to measure. But if I remember correctly, there was a notable difference when testing for some of the sites I frequent ![]()
EDIT: Just thought I'd add that circumventing the dns blocks is not illegal. So you're not helping me break the law or anything ![]()
Last edited by Bladtman242 (2012-07-14 21:10:20)
Offline