Ubuntu – How to specify DNS IP in wicd

resolv.confwicd

I am trying to use a different DNS server other than my router.

I've tried editing /etc/resolv.conf, but my changes always get overwritten.

Here's my networks' config:

Here is my network's config

Yet, this is what my /etc/resolv.conf file looks like:

# Generated by resolvconf
search myhome.westell.com
nameserver 192.168.1.1

Best Answer

  • I'm having the same problem, i believe the culprit is dhclient, which gets run automatically by wicd. whenever the dhcp lease expires, dhclient overwrites /etc/resolv.conf with what it gets from the the dhcp server.

    to verify that this is indded your problem, do "ps aux | grep dhclient", you should an entry pop up, referencing a configuration file for dhclient (on my machine it's at /var/lib/wicd/dhclient.conf).

    to fix this, you need to edit /etc/wicd/dhclient.conf.template (NOT /etc/wicd/dhclient.conf.template.default)

    and add a line like the following:

    supersede 208.67.222.220 208.67.222.20;

    then restart the wicd service with

    sudo service wicd restart

    this will instruct dhclient to set resolv.conf to the manually specified servers, rather then to what your dhcp server (i'm guessing the home router at 192.168.1.1?) is sending you.

    wicd should really handle this for you, but this will solve your problem for now. seems to solve the issue for me.