You are not logged in.

#1 2013-04-10 16:59:13

rEnr3n
Member
Registered: 2012-07-25
Posts: 28

[SOLVED] Can't configure netctl to use multiple DNS servers

Before I tried netctl, I was using netcfg and I was able to use two DNS servers with the following:

DNS=('127.0.0.1' '192.168.2.1')

I tried to use the same format on netctl but only 127.0.0.1 appears on /etc/resolv.conf and I can't surf the net. I'm back to netcfg for now. What am I doing wrong here? Thank you in advance.

Last edited by rEnr3n (2013-04-27 08:01:14)


180 documentaries to expand your mind - http://higherperspectives.com/documentaries/

Offline

#2 2013-04-10 20:07:31

jacobopantoja
Member
From: Madrid
Registered: 2011-03-16
Posts: 44

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

Have you read the whole man pages? May be there you can find the solution.

Offline

#3 2013-04-10 20:19:58

jouke
Member
Registered: 2009-10-14
Posts: 63

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

I think you're right and have committed a fix to appear in the next version.
Until then you can add DHCPOptions="-C resolv.conf" to your profile.

Offline

#4 2013-04-14 12:23:44

noalwin
Member
From: Spain
Registered: 2007-06-08
Posts: 115

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

jouke wrote:

I think you're right and have committed a fix to appear in the next version.
Until then you can add DHCPOptions="-C resolv.conf" to your profile.

I'm using ethernet static so DHCPOptions="-C resolv.conf" does not work for me. But I can use:

ExecUpPost=('echo -e nameserver 127.0.0.1\\nnameserver 123.456.789.123\\nnameserver 123.456.789.123\\nnameserver 192.168.1.1\\nnameserver 8.8.8.8\\nnameserver 8.8.4.4 > /etc/resolv.conf ')

It's not elegant but it works.

Last edited by noalwin (2013-04-14 12:25:00)

Offline

#5 2013-04-15 19:16:05

jouke
Member
Registered: 2009-10-14
Posts: 63

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

netctl uses resolvconf, which puts only 127.0.0.1 in /etc/resolv.conf if it is one of the preferred DNS servers.

Last edited by jouke (2013-04-15 19:16:24)

Offline

#6 2013-04-26 16:37:13

jouke
Member
Registered: 2009-10-14
Posts: 63

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

This was also reported as FS#34966. It turns out that this behavior of resolvconf can be switched off by setting resolv_conf_local_only=NO in /etc/resolvconf.conf. Read more about it in the man page: resolvconf.conf(5).

Offline

#7 2013-07-06 05:51:25

Roukoswarf
Member
From: Ontario, Canada
Registered: 2012-10-04
Posts: 8
Website

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

Thank you good sir jouke, saved me some pain pointing out that flag.

Offline

#8 2014-02-05 14:46:32

chaonaut
Member
From: Kyiv, Ukraine
Registered: 2014-02-05
Posts: 317

Re: [SOLVED] Can't configure netctl to use multiple DNS servers

i’ve just tried specifying

resolv_conf_local_only=no

in /etc/resolvconf.conf, but this has no effect.
i suspect resolvconf is called in some way that it does not respect this option.

so, here is quite elegant workaround. if resolv_conf_local_only specified in the netctl profile itself, everything begins to work as expected:

DNSOptions=('resolv_conf_local_only=no')                                                                                                     
DNS=('62.149.2.52' '62.149.2.60' '8.8.4.4' '8.8.8.8')

the result is correctly generated /etc/resolv.conf

EDIT: tried this both with and without resolv_conf_local_only=no in /etc/resolvconf.conf. the resulting /etc/resolv.conf is identical.

Last edited by chaonaut (2014-02-05 15:00:01)


— love is the law, love under wheel, — said aleister crowley and typed in his terminal:
usermod -a -G wheel love

Offline

Board footer

Powered by FluxBB