You are not logged in.
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)
Offline
Have you read the whole man pages? May be there you can find the solution.
Offline
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
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
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
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
Thank you good sir jouke, saved me some pain pointing out that flag.
Offline
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