manual dns don't work

Bug #145405 reported by Antonio
60
This bug affects 8 people
Affects Status Importance Assigned to Milestone
wicd
Fix Committed
High
Unassigned

Bug Description

manual dsn configured, in order to use opendns, but it use standard dns of my isp, thank you.

using ubuntu 7.04

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

What version of wicd are you using?

Dan O'Reilly (oreilldf)
Changed in wicd:
status: New → Incomplete
Revision history for this message
phys_user (myemail-slopsbox) wrote :

I think that I have a similar problem: i configured a global dns, and when I select connect to the cabled network, it never changes the dns from the dns that I was using in the wireless network. It changes correctly the dns when I am on a cabled network and change to a wireless network.

I use wicd 1.4.1, with debian lenny amd64.

Revision history for this message
elbistro (elbistro) wrote :

Same problem for me with wicd 1.4.2-1 under Ubuntu Gutsy Gibbon.

I configure global DNS in preferences.

I open a wireless connection to change settings by checking "static DNS" and "use global DNS" then I click on connexion.
If I reopen the same wireless connection settings "static DNS" and "use global DNS" are unchecked.

On first connection the settings are correct with global DNS in /etc/resolv.conf but the second time the DNS in /etc/resolv.conf are defaut access point ones.

Revision history for this message
Dan O'Reilly (oreilldf) wrote :

I'll take a look at this and make sure it works for the next major release.

Revision history for this message
Loye Young (loyeyoung) wrote :

This is the downside of fixing Bug 181031.

The problem is not strictly speaking solely a wicd problem: several of the dhcp client applications overwrite /etc/resolv.conf, often in unintended ways. The worst offender is the combination of dhcdbd and network-manager, which silently overrides the system's network configurations.

When I need the /etc/resolv.conf file not to change, I remove the write bit from privileges, which prevents changes by other programs, viz:

# sudo chmod a-w /etc/resolv.conf

Happy Trails,

Loye Young
Isaac & Young Computer Company
Laredo, Texas
http://www.iycc.net

Revision history for this message
Robby Workman (rworkman) wrote :

This should be fixed in both 1.5.x and 1.6.x, I believe. If I'm wrong, either reopen this bug or file a new one.

Changed in wicd:
status: Incomplete → Fix Released
Revision history for this message
Brian J. Cohen (brianjcohen) wrote :

I have re-opened this bug, as it still appears to be an issue in 1.6.2.2.

Changed in wicd:
status: Fix Released → Incomplete
Revision history for this message
José Valecillos (j-valecillos) wrote :

The problem is present in 1.7.0 version too.

Changed in wicd:
status: Incomplete → Confirmed
Revision history for this message
madskaddie (madskaddie) wrote :

I confirm the bug in the 1.6.1 (installed via Karmic repos.). Strictly speaking, this is not a wicd bug: if I understood correctly from the wicd sources, wicd relies on a external dhcp clientto adquire the dynamic network configuration. In Debian/Ubuntu this client is dhclient. By default, the dhclient config requests DNS information (checkout the "request" line in /etc/dhcp3/dhclient.conf or your distro equivalent). Until the dhclient updates, my DNS config is correct

In order to fix this bug we have to write a good configuration file (which doesn't DNS requests) and pass it through
"dhclient -cf $FILE". I guess the:
"
client_dict = {
            "dhclient" :
                {'connect' : r"%(cmd)s %(iface)s",
                 'release' : r"%(cmd)s -r %(iface)s",
                 'id' : misc.DHCLIENT,
                 },
" @ wnettools.py
must be changed to "'connet': ... -cf %(file)" ....

Revision history for this message
saygin (sayginb) wrote :

this bug is still present in 1.7.0 in Kubuntu Lucid.

Revision history for this message
vajorie (vajorie) wrote :

I have the 1.7.0 version on Arch (using dhcpcd) and have this bug as well. I have set DNS servers both globally and for the connection I am using. Is there anything we could do to help resolve this?

Revision history for this message
welt (n03i) wrote :

you can edit manually in your system. Open Terminal and type:
sudo gedit /etc/resolv.conf

and add or change the line to your individual settings:
nameserver 123.your.personal.DNS

Revision history for this message
Daniel Derezinski (yp2) wrote :

You can probably bypass this bug by putting shell script in /etc/wicd/scripts/postconnect/ .

sudo nano /etc/wicd/scripts/postconnect/dhcp

paste this:

#!/bin/bash

dhclient

then edit :

sudo nano /etc/dhcp3/dhclient.conf

at the end of file past this:

prepend domain-name-servers DNS-ip;
prepend domain-name-servers DNS-ip;
prepend domain-name-servers DNS-ip;

remember that the last entry in dhclient.conf will by first entry in /etc/resolve.conf - it will by your first DNS.
Reconnect or reboot it would work.

Revision history for this message
Daniel Derezinski (yp2) wrote :

I forgot to add this:

sudo chmod +x sudo nano /etc/wicd/scripts/postconnect/dhcp

you have to make it executable of course :)

Revision history for this message
Daniel Derezinski (yp2) wrote :

Ok I figure out it bit.
In Ubuntu 10.04 apparmor is responsible for not allowing to run dhclient with option -cf pointing to /var/lib/wicd/dhclient.conf.

Maybe wicd should run dhclient with default config file for dhcp3 client - /etc/dhcp3/dhclient.conf.

I don't understand why wicd creates it's own dhclinet.conf and try to used it.

Another options here is to write rules for apparmor (/etc/apparmor.d/sbin.dhclient3) with appropriate entries for wicd.

Revision history for this message
Michael Kirk (michael-john-kirk) wrote :

present in Version: 1.7.0+ds1-6 on debian

Using dhcpcd and dhclient

Revision history for this message
darkfeline (cyberdupo56) wrote :

I'm not sure if this is the same bug, but wicd correctly sets static dns when connecting to a wireless network, but when it renews its dhcp lease, /etc/resolv.conf is overwritten with the dhcp provided dns.

Arch Linux with wicd 1.7.1-2

Revision history for this message
J.L. (jl2001) wrote :

"wicd correctly sets static dns when connecting to a wireless network, but when it renews its dhcp lease, /etc/resolv.conf is overwritten with the dhcp provided dns." I confirme, ubuntu 11.10

Revision history for this message
Leonardo Guilherme de Freitas (leonardo-guilherme) wrote :

I also confirm that dns is being replaced in a dhcp renew, the DNS configuration works the first time it connects. Wicd needs to prevent the dhcp client from overwriting dns information.

wicd 1.7.1-2

Revision history for this message
Leonardo Guilherme de Freitas (leonardo-guilherme) wrote :

I've created this attached patch. It forwards to the StartDHCP routine that a static dns will be configured, so it can properly tell the dhcp client to avoid rewriting dns information.

 I've fixed it for dhcpcd, which is the dhcp client I use and know, but since each dhcp client has its own commands, I left room to people that uses other clients to change it before applying the patch, by allowing extra parameters to be passed to the dhcp client (have a look at __get_dhcp_command, the 'extra' variable).

Leonardo.

Revision history for this message
Pieter Leclerc (pieterleclerc-deactivatedaccount) wrote :

Fix merged and committed. Can you try again, please?

Changed in wicd:
importance: Undecided → High
assignee: nobody → Tom Van Braeckel (tomvanbraeckel)
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.