[oS-en] Problem with /etc/resolv.conf
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 My resolv.conf file on new laptop contains: Laicolasse:~ # cat /etc/resolv.conf ### /etc/resolv.conf is a symlink to /run/netconfig/resolv.conf ### autogenerated by netconfig! # # Before you change this file manually, consider to define the # static DNS configuration using the following variables in the # /etc/sysconfig/network/config file: # NETCONFIG_DNS_STATIC_SEARCHLIST # NETCONFIG_DNS_STATIC_SERVERS # NETCONFIG_DNS_FORWARDER # or disable DNS configuration updates via netconfig by setting: # NETCONFIG_DNS_POLICY='' # # See also the netconfig(8) manual page and other documentation. # ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250 Laicolasse:~ # It is not reading those variables: Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" # When the NETCONFIG_DNS_FORWARDER variable is set to "resolver", NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Laicolasse:~ # On my older laptop, it works: Legolas:~ # cat /etc/resolv.conf ### /etc/resolv.conf is a symlink to /run/netconfig/resolv.conf ### autogenerated by netconfig! # # Before you change this file manually, consider to define the # static DNS configuration using the following variables in the # /etc/sysconfig/network/config file: # NETCONFIG_DNS_STATIC_SEARCHLIST # NETCONFIG_DNS_STATIC_SERVERS # NETCONFIG_DNS_FORWARDER # or disable DNS configuration updates via netconfig by setting: # NETCONFIG_DNS_POLICY='' # # See also the netconfig(8) manual page and other documentation. # ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. search valinor Legolas.valinor nameserver 127.0.0.1 Legolas:~ # Calling that program does nothing. What am I missing? Maybe I have to write it up in the Network Manager config. I put in the wifi connection I am using [ipv4] dns=127.0.0.1; then wifi off, wifi on. Does not work. Then, I edit the information using the Netowrk Manager GUI. Now I get: ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250 nameserver 127.0.0.1 Laicolasse:~ # Which is not valid, it is still using the two servers from Telefónica. The GUI says "add", I want to replace. (the problem is that this way it is it not using dnsmasq!) The only way out I see is editing my own resolv file :-/ Done, it works. Will it survive a reboot? I guess not. :-( - -- Cheers Carlos E. R. (from 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZCtggRwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVuU8AoJFdHVJv1rwvz1gR6PV1 /F2fcOhXAKCLZ9rIW3g/CWGzSxvdSIgDRv9vxQ== =p8Vq -----END PGP SIGNATURE-----
From: "Carlos E. R." <robin.listas@telefonica.net> Date: Tue, 4 Apr 2023 01:25:52 +0200 (CEST) . . . Then, I edit the information using the Netowrk Manager GUI. Now I get: ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250 nameserver 127.0.0.1 Laicolasse:~ # Which is not valid, it is still using the two servers from Telefónica. The GUI says "add", I want to replace. (the problem is that this way it is it not using dnsmasq!) The only way out I see is editing my own resolv file :-/ Done, it works. Will it survive a reboot? I guess not. :-( - -- Cheers Carlos E. R. (from 15.4 x86_64 at Telcontar) I noticed that the Yast2 "Network Settings" screen has a "Modify DNS Configuration" popup under "Hostname/DNS". So I tried changing it from "Use Default Policy" to "Only Manually" and doing only that had the effect of changing NETCONFIG_DNS_POLICY in /etc/sysconfig/network/config from "auto" to "". Back in "Network Settings" the popup then said "Use Custom Policy" (before I restored it). So maybe that's what you need to do -- whether by GUI or editing /etc/sysconfig/network/config. -- Bob Rogers http://www.rgrjr.com/
Carlos E. R. wrote:
My resolv.conf file on new laptop contains:
[snip]
search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250
apart from the slightly unnusual search list, it looks good. "Laicolasse.valinor" is the laptop, right?
It is not reading those variables:
Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\ NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" # When the NETCONFIG_DNS_FORWARDER variable is set to "resolver", NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1"
With that, you are expecting this? search valinor valinor nameserver 127.0.0.1 (I don't understand why you have two 'valinor', but that is irrelevanbt).
On my older laptop, it works:
[snip]
search valinor Legolas.valinor nameserver 127.0.0.1
What am I missing?
I didn't see anything obvious, I'll try it myself. I have just modified 'janeway' accordingly, it's booting. -- Per Jessen, Zürich (0.0°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Per Jessen wrote:
[snip]
search valinor Legolas.valinor nameserver 127.0.0.1
What am I missing?
I didn't see anything obvious, I'll try it myself. I have just modified 'janeway' accordingly, it's booting.
After adding NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" I get a /etc/resolv.conf looking like this: search valinor local.hrz z.local.hrz i.local.hrz nameserver 127.0.0.1 nameserver 192.168.2.254 so the static config is merged/added to the dhcp config. That works for me, although I don't have any resolver on 127.0.0.1. -- Per Jessen, Zürich (0.0°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Tue, Apr 4, 2023 at 9:54 AM Per Jessen <per@jessen.ch> wrote:
so the static config is merged/added to the dhcp config.
What are your /etc/sysconfig/network/config settings (DNS_*) and what network management program are you using? You do realize that saying "it works for me" without providing this information is useless, don't you?
Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 9:54 AM Per Jessen <per@jessen.ch> wrote:
so the static config is merged/added to the dhcp config.
What are your /etc/sysconfig/network/config settings (DNS_*) and what network management program are you using? You do realize that saying "it works for me" without providing this information is useless, don't you?
Not at all useless - "it works for me" means hope, it means it _can_ be made to work, given the right circumstances :-) Wrt /etc/sysconfig/network/config settings (DNS_*), I only touched the two settings I mentioned, the rest I left as they were installed: per@janeway:~> grep ^NET /etc/sysconfig/network/config NETCONFIG_MODULES_ORDER="dns-resolver dns-bind dns-dnsmasq nis ntp-runtime" NETCONFIG_VERBOSE="no" NETCONFIG_FORCE_REPLACE="no" NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" NETCONFIG_DNS_RANKING="auto" NETCONFIG_DNS_RESOLVER_OPTIONS="" NETCONFIG_DNS_RESOLVER_SORTLIST="" NETCONFIG_NTP_POLICY="auto" NETCONFIG_NTP_STATIC_SERVERS="" NETCONFIG_NIS_POLICY="auto" NETCONFIG_NIS_SETDOMAINNAME="yes" NETCONFIG_NIS_STATIC_DOMAIN="" NETCONFIG_NIS_STATIC_SERVERS="" I'm using wicked on leap 15.5. -- Per Jessen, Zürich (0.6°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 10:29 AM Per Jessen <per@jessen.ch> wrote: ...
NETCONFIG_DNS_POLICY="auto" ...
I'm using wicked on leap 15.5.
Yes, and with wicked "auto" resolves to "STATIC *" which means - merge information from all interfaces *and* static entries.
Right - so both examples are working as designed, just differently. With NM, the dhcp config take precedence, with wicked, the dhcp and the static config are merged. Interesting difference. -- Per Jessen, Zürich (0.7°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 10:43 AM Per Jessen <per@jessen.ch> wrote:
With NM, the dhcp config take precedence
No. With NM the NM config takes precedence. Whether NM information comes from DHCP or NM static entries is entirely up to NM settings.
ah, another minor twist :-) I do have NM on my laptop, but I have never added any static/DNS config, it just uses whatever dhcp dishes out. -- Per Jessen, Zürich (5.1°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-04-04 13:38, Per Jessen wrote:
Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 10:43 AM Per Jessen <per@jessen.ch> wrote:
With NM, the dhcp config take precedence
No. With NM the NM config takes precedence. Whether NM information comes from DHCP or NM static entries is entirely up to NM settings.
ah, another minor twist :-)
I do have NM on my laptop, but I have never added any static/DNS config, it just uses whatever dhcp dishes out.
Well, then how do I make /etc/resolv.conf just have the config I decide? Using NM. Yes, I did look at netconfig(8), can't see anything relevant. I can't use YaST, the pertinent boxes are greyed out. The only way I know is to write the file myself :-/ If need be, I'll write it to /run on every boot with some script or cron job. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Tue, Apr 4, 2023 at 3:04 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Well, then how do I make /etc/resolv.conf just have the config I decide? Using NM.
Are you kidding me? You have another system with NetworkManager that works the way you want. So just configure the new system identically.
Yes, I did look at netconfig(8), can't see anything relevant.
Of course you will not find in netconfig(8) instructions how to do it "using NM". But you most certainly find a description of netconfig policies. So set NETCONFIG_DNS_POLICY="STATIC" and be happy.
On 2023-04-04 14:20, Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 3:04 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Well, then how do I make /etc/resolv.conf just have the config I decide? Using NM.
Are you kidding me? You have another system with NetworkManager that works the way you want. So just configure the new system identically.
I did. Doesn't work.
Yes, I did look at netconfig(8), can't see anything relevant.
Of course you will not find in netconfig(8) instructions how to do it "using NM". But you most certainly find a description of netconfig policies. So set NETCONFIG_DNS_POLICY="STATIC" and be happy.
Ok, will try that. [...] Doesn't work. Result is an empty file. Laicolasse:~ # cat /etc/resolv.conf ### /etc/resolv.conf is a symlink to /run/netconfig/resolv.conf ### autogenerated by netconfig! # # Before you change this file manually, consider to define the # static DNS configuration using the following variables in the # /etc/sysconfig/network/config file: # NETCONFIG_DNS_STATIC_SEARCHLIST # NETCONFIG_DNS_STATIC_SERVERS # NETCONFIG_DNS_FORWARDER # or disable DNS configuration updates via netconfig by setting: # NETCONFIG_DNS_POLICY='' # # See also the netconfig(8) manual page and other documentation. # ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. Laicolasse:~ # -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Tue, Apr 4, 2023 at 3:36 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2023-04-04 14:20, Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 3:04 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Well, then how do I make /etc/resolv.conf just have the config I decide? Using NM.
Are you kidding me? You have another system with NetworkManager that works the way you want. So just configure the new system identically.
I did.
No, you did not. This is one of rare cases when you did provide factual information from both systems so it was possible to compare them.
On 2023-04-04 14:46, Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 3:36 PM Carlos E. R. <> wrote:
On 2023-04-04 14:20, Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 3:04 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
Well, then how do I make /etc/resolv.conf just have the config I decide? Using NM.
Are you kidding me? You have another system with NetworkManager that works the way you want. So just configure the new system identically.
I did.
No, you did not. This is one of rare cases when you did provide factual information from both systems so it was possible to compare them.
I absolutely did so. I copied the file over. And no, that file was not posted here, because I do not find the string "/etc/0_Legolas/sysconfig/network/config" in the emails. You could not see it and compare. So I post it now - previous laptop:
Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/0_Legolas/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" # When the NETCONFIG_DNS_FORWARDER variable is set to "resolver", NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Laicolasse:~ #
And what I posted about this machine:
Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" # When the NETCONFIG_DNS_FORWARDER variable is set to "resolver", NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Laicolasse:~ #
As you can see, they were identical. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Tue, Apr 4, 2023 at 4:07 PM Carlos E. R. <robin.listas@telefonica.net> wrote:
As you can see, they were identical.
I said "configure the new system identically", not "configure netconfig on the new system identically". You wanted NM to provide a static DNS server list and on the old system NM is configured to provide a static DNS server list. I even told you how to do it earlier and it is exactly how NM is configured on the old system. So I really do not understand this thread at all.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2023-04-04 a las 16:18 +0300, Andrei Borzenkov escribió:
On Tue, Apr 4, 2023 at 4:07 PM Carlos E. R. <> wrote:
As you can see, they were identical.
I said "configure the new system identically", not "configure netconfig on the new system identically". You wanted NM to provide a static DNS server list
No, I do not want NM to provide anything DNS wise. I'm forced to try to configure NM because netconfig doesn't do what I want. The file "/etc/resolv.conf" doesn't mention NM at all. In fact, NM should configure the servers in dnsmask instead and leave resolv.conf alone.
and on the old system NM is configured to provide a static DNS server list. I even told you how to do it earlier and it is exactly how NM is configured on the old system. So I really do not understand this thread at all.
This thread exists because simply I do not understand how to get the system to do what I need and I do not understand your explanations. Sorry, I do not see the post where you told me how to configure NM. In fact, I posted NM configuration this morning, no answer. I post now the diffs: Laicolasse:~ # diff --side-by-side --suppress-common-lines /etc/0_Legolas/NetworkManager/system-connections/En\ un\ lugar\ de\ la\ Mancha /etc/NetworkManager/system-connections/En\ un\ lugar\ de\ la\ Mancha.nmconnection uuid=5488e905-........ | uuid=be61fc8... > interface-name=wlan0 > metered=2 timestamp=1647464311 | timestamp=1680612246 zone=home < mac-address=A0:... < seen-bssids=70:...; < dns=127.0.0.1; < ignore-auto-dns=true < may-fail=false < ip6-privacy=0 < Laicolasse:~ # The differences are things I tried when things did not work. I'm not touching it now that netconfig is finally doing what I want, more or less. - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZCyQ/hwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVhuQAn17pCmpD9W4/INYb5Jop JtTW7sAEAJ9baCZ+wn+cybc4lh0TkZcdvn6I9w== =jKSL -----END PGP SIGNATURE-----
On 2023-04-04 08:14, Per Jessen wrote:
Carlos E. R. wrote:
My resolv.conf file on new laptop contains:
[snip]
search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250
apart from the slightly unnusual search list, it looks good. "Laicolasse.valinor" is the laptop, right?
Right. I'm unsure why it doesn't have "valinor" alone. Another weird thing.
It is not reading those variables:
Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\ NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" # When the NETCONFIG_DNS_FORWARDER variable is set to "resolver", NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1"
With that, you are expecting this?
search valinor valinor nameserver 127.0.0.1
yes.
(I don't understand why you have two 'valinor', but that is irrelevanbt).
Me neither. I mean, I just copied over the config file.
On my older laptop, it works:
[snip]
search valinor Legolas.valinor nameserver 127.0.0.1
What am I missing?
I didn't see anything obvious, I'll try it myself. I have just modified 'janeway' accordingly, it's booting.
But you are using wicked, I am using network manager, being a laptop. And you get search valinor local.hrz z.local.hrz i.local.hrz nameserver 127.0.0.1 nameserver 192.168.2.254 Where comes the "192.168.2.254" entry from? It is not in your file: NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-04-04 08:14, Per Jessen wrote:
Carlos E. R. wrote:
My resolv.conf file on new laptop contains:
[snip]
search Laicolasse.valinor nameserver 80.58.61.254 nameserver 80.58.61.250
apart from the slightly unnusual search list, it looks good. "Laicolasse.valinor" is the laptop, right?
Right. I'm unsure why it doesn't have "valinor" alone. Another weird thing.
See Andrei's explanation - by default, it seems that NM ignores the sysconfig, so the above is all from dhcp.
But you are using wicked, I am using network manager, being a laptop.
I wonder if the choice wicked vs NM is based on whether a machine is installed with a window manager or not. I have two Raspis - one uses wicked and has no gui, the other uses NM and has a GUI.
And you get
search valinor local.hrz z.local.hrz i.local.hrz nameserver 127.0.0.1 nameserver 192.168.2.254
Where comes the "192.168.2.254" entry from?
From dhcp, along with the rest of the search domains.
-- Per Jessen, Zürich (7.9°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Tue, Apr 4, 2023 at 2:26 AM Carlos E. R. <robin.listas@telefonica.net> wrote: ....
### /etc/resolv.conf is a symlink to /run/netconfig/resolv.conf ### autogenerated by netconfig! # ...
It is not reading those variables:
Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" ...
On my older laptop, it works:
You neither show netconfig configuration from "older laptop", nor even tell us what network management program you are using on either of them so it is entirely useless information. ...
Maybe I have to write it up in the Network Manager config.
So it turns out you are using NetworkManager (although you mentioned two systems so far and it is still entirely unclear which one has NetworkManager). Assuming this is the "non-working" one - read "man netconfig" once more. Policy "auto" resolves to "NetworkManager STATIC_FALLBACK" in presence of NetworkManager which means, static entries from /etc/sysconfig/network/config are used only if no information from NetworkManager is available.
I put in the wifi connection I am using
[ipv4] dns=127.0.0.1;
These servers are added to whatever NetworkManager gets from DHCP. If you do not want to use information from DHCP, set "ignore-auto-dns" (I believe, some GUI has the choice "use DHCP only for IP address" or similar. ...
The only way out I see is editing my own resolv file :-/
Done, it works. Will it survive a reboot? I guess not. :-(
What makes you think so?
On 2023-04-04 08:45, Andrei Borzenkov wrote:
On Tue, Apr 4, 2023 at 2:26 AM Carlos E. R. <robin.listas@telefonica.net> wrote: ....
### /etc/resolv.conf is a symlink to /run/netconfig/resolv.conf ### autogenerated by netconfig! # ...
It is not reading those variables:
Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config NETCONFIG_DNS_POLICY="auto" ...
On my older laptop, it works:
You neither show netconfig configuration from "older laptop", nor even tell us what network management program you are using on either of them so it is entirely useless information.
Being both laptops, network manager is the obvious choice.
...
Maybe I have to write it up in the Network Manager config.
So it turns out you are using NetworkManager (although you mentioned two systems so far and it is still entirely unclear which one has NetworkManager). Assuming this is the "non-working" one - read "man netconfig" once more. Policy "auto" resolves to "NetworkManager STATIC_FALLBACK" in presence of NetworkManager which means, static entries from /etc/sysconfig/network/config are used only if no information from NetworkManager is available.
I put in the wifi connection I am using
[ipv4] dns=127.0.0.1;
These servers are added to whatever NetworkManager gets from DHCP. If you do not want to use information from DHCP, set "ignore-auto-dns" (I believe, some GUI has the choice "use DHCP only for IP address" or similar.
...
The only way out I see is editing my own resolv file :-/
Done, it works. Will it survive a reboot? I guess not. :-(
What makes you think so?
It did not even survive a suspend. I know it is a tmpfs, but maybe there is some automatic magic. How would I know? The only way out I see is breaking the symlink and writing my own file. Ok, old laptop: Laicolasse:~ # cat /etc/0_Legolas/NetworkManager/system-connections/En\ un\ lugar\ de\ la\ Mancha [connection] id=En un lugar de la Mancha uuid=.... type=wifi permissions= timestamp=1647464311 zone=home [wifi] mac-address=.... mac-address-blacklist= mode=infrastructure seen-bssids=... ssid=... [wifi-security] key-mgmt=wpa-psk psk=... [ipv4] dns=127.0.0.1; dns-search= ignore-auto-dns=true may-fail=false method=auto [ipv6] addr-gen-mode=stable-privacy dns-search= ip6-privacy=0 method=auto [proxy] Laicolasse:~ # New laptop: Laicolasse:~ # cat /etc//NetworkManager/system-connections/En\ un\ lugar\ de\ la\ Mancha.nmconnection [connection] id=En un lugar de la Mancha uuid=... type=wifi interface-name=wlan0 metered=2 permissions= timestamp=1680564010 [wifi] mac-address-blacklist= mode=infrastructure ssid=... [wifi-security] key-mgmt=wpa-psk psk=... [ipv4] dns=127.0.0.1; dns-search= method=auto [ipv6] addr-gen-mode=stable-privacy dns-search= method=auto [proxy] Laicolasse:~ # -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 2023-04-04 01:25, Carlos E. R. wrote:
My resolv.conf file on new laptop contains:
...
Which is not valid, it is still using the two servers from Telefónica. The GUI says "add", I want to replace.
(the problem is that this way it is it not using dnsmasq!)
The only way out I see is editing my own resolv file :-/
Done, it works. Will it survive a reboot? I guess not. :-(
Question: What is the approved way to use Network Manager and DNSmasq on openSUSE? This means: a) resolv.conf ONLY contains: search valinor nameserver 127.0.0.1 and never change. b) the dnsmasq configuration must be adapted automatically to the external dns servers it gets via dhcp. <https://en.opensuse.org/Special:Search?search=dnsmasq> finds nothing relevant -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 2023-04-04 14:24, Carlos E. R. wrote:
On 2023-04-04 01:25, Carlos E. R. wrote:
My resolv.conf file on new laptop contains:
...
Which is not valid, it is still using the two servers from Telefónica. The GUI says "add", I want to replace.
(the problem is that this way it is it not using dnsmasq!)
The only way out I see is editing my own resolv file :-/
Done, it works. Will it survive a reboot? I guess not. :-(
Question:
What is the approved way to use Network Manager and DNSmasq on openSUSE?
This means:
a) resolv.conf ONLY contains:
search valinor nameserver 127.0.0.1
and never change.
b) the dnsmasq configuration must be adapted automatically to the external dns servers it gets via dhcp.
<https://en.opensuse.org/Special:Search?search=dnsmasq>
finds nothing relevant
Found something that works (it seems). /etc/sysconfig/network/config NETCONFIG_FORCE_REPLACE="no" NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" This produces in /etc/resolv.conf: search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250 which is acceptable. Notice that the older laptop doesn't use this. I don't know where that "search" is coming from, as the file contains NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" which is not taking. If I now say NETCONFIG_DNS_POLICY="static" Then I get: ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. nameserver 127.0.0.1 Laicolasse:~ # No search line. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
Found something that works (it seems). /etc/sysconfig/network/config
NETCONFIG_FORCE_REPLACE="no" NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
The above is also what I'm using on a machine that has NM and dnsmasq.
This produces in /etc/resolv.conf:
search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250
Yup, that looks about right. That is your dhcp info plus the 127.0.0.1 (which NM has somehow figured out).
I don't know where that "search" is coming from,
dhcp.
as the file contains NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor"
That is being ignored.
which is not taking. If I now say NETCONFIG_DNS_POLICY="static"
I expect you have to use "STATIC". -- Per Jessen, Zürich (7.7°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 04.04.2023 17:17, Per Jessen wrote:
NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
...>
Yup, that looks about right. That is your dhcp info plus the 127.0.0.1 (which NM has somehow figured out).
No, 127.0.0.1 comes from NETCONFIG_DNS_FORWARDER_FALLBACK
Andrei Borzenkov wrote:
On 04.04.2023 17:17, Per Jessen wrote:
NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
...>
Yup, that looks about right. That is your dhcp info plus the 127.0.0.1 (which NM has somehow figured out).
No, 127.0.0.1 comes from NETCONFIG_DNS_FORWARDER_FALLBACK
Ah yes, I see it in the comments now. "an explicit localhost nameserver address". Just for fun, I tried to force my dnsmasq to only listen on 127.0.0.44, but I couldn't make it stop listening on 127.0.0.1. I didn't continue, it was only a bit of fun. -- Per Jessen, Zürich (6.1°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-04-04 16:17, Per Jessen wrote:
Carlos E. R. wrote:
Found something that works (it seems). /etc/sysconfig/network/config
NETCONFIG_FORCE_REPLACE="no" NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
The above is also what I'm using on a machine that has NM and dnsmasq.
I agree it makes sense to use «NETCONFIG_DNS_FORWARDER="dnsmasq"», but the old laptop doesn't have it. It has: Laicolasse:~ # grep NETCONFIG_DNS_FORWARDER /etc/0_Legolas/sysconfig/network/config NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
This produces in /etc/resolv.conf:
search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250
Yup, that looks about right. That is your dhcp info plus the 127.0.0.1 (which NM has somehow figured out).
Rather the 127.0.0.1 plus the dhcp info. The order is crucial.
I don't know where that "search" is coming from,
dhcp.
No. This is the dhcp dns config in my router: https://paste.opensuse.org/pastes/8ed26ccac8bb There is no entry to setup the search.
as the file contains NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor"
That is being ignored.
Yes.
which is not taking. If I now say NETCONFIG_DNS_POLICY="static"
I expect you have to use "STATIC".
Why? :-? NETCONFIG_DNS_POLICY="auto" takes, lowercase. Trying, anyway NETCONFIG_DNS_POLICY="STATIC" Laicolasse:~ # netconfig update -f Laicolasse:~ # tail /etc/resolv.conf # NETCONFIG_DNS_STATIC_SERVERS # NETCONFIG_DNS_FORWARDER # or disable DNS configuration updates via netconfig by setting: # NETCONFIG_DNS_POLICY='' # # See also the netconfig(8) manual page and other documentation. # ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. search valinor nameserver 127.0.0.1 Laicolasse:~ # The fallback DNS servers are missing, but the search line is good. :-o NETCONFIG_DNS_POLICY="static" Laicolasse:~ # netconfig update -f Laicolasse:~ # tail /etc/resolv.conf # NETCONFIG_DNS_STATIC_SEARCHLIST # NETCONFIG_DNS_STATIC_SERVERS # NETCONFIG_DNS_FORWARDER # or disable DNS configuration updates via netconfig by setting: # NETCONFIG_DNS_POLICY='' # # See also the netconfig(8) manual page and other documentation. # ### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. nameserver 127.0.0.1 Laicolasse:~ # Huh? :-O Ok, leaving as STATIC. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
I don't know where that "search" is coming from,
dhcp.
No.
This is the dhcp dns config in my router: https://paste.opensuse.org/pastes/8ed26ccac8bb There is no entry to setup the search.
I think it would be more useful if you showed us the dhcp lease information instead. The config is specific to your router, we can't help with that. Try looking for the most recent lease: ls -lrt /var/lib/NetworkManager/*lease Here's is mine: https://paste.opensuse.org/pastes/37f3f013acdd
which is not taking. If I now say NETCONFIG_DNS_POLICY="static"
I expect you have to use "STATIC".
Why? :-?
That is what the man page says - it suggests the option is case sensitive. Unusual yes.
NETCONFIG_DNS_POLICY="auto" takes, lowercase.
That is also what the man page says. -- Per Jessen, Zürich (1.5°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-04-05 08:50, Per Jessen wrote:
Carlos E. R. wrote:
I don't know where that "search" is coming from,
dhcp.
No.
This is the dhcp dns config in my router: https://paste.opensuse.org/pastes/8ed26ccac8bb There is no entry to setup the search.
I think it would be more useful if you showed us the dhcp lease information instead. The config is specific to your router, we can't help with that.
I wanted to, but did not remember how. Laicolasse:~ # dhcp[tab][tab] produces nothing.
Try looking for the most recent lease:
ls -lrt /var/lib/NetworkManager/*lease
Oh, this method is new to me.
Laicolasse:~ # ls -lrt /var/lib/NetworkManager/*lease -rw-r--r-- 1 root root 77 Mar 28 03:26 /var/lib/NetworkManager/dhclient6-7ba00b1d-8cdd-30da-91ad-bb83ed4f7474-eth0.lease -rw-r--r-- 1 root root 1423 Mar 29 22:20 /var/lib/NetworkManager/dhclient-7ba00b1d-8cdd-30da-91ad-bb83ed4f7474-eth0.lease -rw-r--r-- 1 root root 77 Mar 29 22:30 /var/lib/NetworkManager/dhclient6-be61fc8f-4867-4cfb-a816-e03e05ff8eef-wlan0.lease -rw-r--r-- 1 root root 1054 Apr 5 11:00 /var/lib/NetworkManager/dhclient-be61fc8f-4867-4cfb-a816-e03e05ff8eef-wlan0.lease Laicolasse:~ #
Laicolasse:~ # cat /var/lib/NetworkManager/dhclient-be61fc8f-4867-4cfb-a816-e03e05ff8eef-wlan0.lease lease { interface "wlan0"; fixed-address 192.168.2.18; option subnet-mask 255.255.0.0; option dhcp-lease-time 43200; option routers 192.168.1.1; option dhcp-message-type 5; option dhcp-server-identifier 192.168.1.1; option domain-name-servers 80.58.61.254,80.58.61.250; option rfc4833-tz-posix-string "CET-1CEST-2,M3.5.0/02:00,M10.5.0/03:00"; option unknown-120 1:31:30:2e:33; option ntp-servers 10.22.64.1; renew 3 2023/04/05 06:05:17; rebind 3 2023/04/05 11:53:14; expire 3 2023/04/05 13:23:14; } lease { interface "wlan0"; fixed-address 192.168.2.18; option subnet-mask 255.255.0.0; option routers 192.168.1.1; option dhcp-lease-time 43200; option dhcp-message-type 5; option domain-name-servers 80.58.61.254,80.58.61.250; option dhcp-server-identifier 192.168.1.1; option rfc4833-tz-posix-string "CET-1CEST-2,M3.5.0/02:00,M10.5.0/03:00"; option unknown-120 1:31:30:2e:33; option ntp-servers 10.22.64.1; renew 3 2023/04/05 14:51:05; rebind 3 2023/04/05 19:30:51; expire 3 2023/04/05 21:00:51; } Laicolasse:~ # See? No search item. And an ntp item I knew nothing about.
Here's is mine: https://paste.opensuse.org/pastes/37f3f013acdd
which is not taking. If I now say NETCONFIG_DNS_POLICY="static"
I expect you have to use "STATIC".
Why? :-?
That is what the man page says - it suggests the option is case sensitive. Unusual yes.
NETCONFIG_DNS_POLICY="auto" takes, lowercase.
That is also what the man page says.
Ok, funny. "" also works. Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config | egrep -v "^[[:space:]]*$|^#" NETCONFIG_DNS_POLICY="" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Laicolasse:~ # Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search valinor nameserver 127.0.0.1 Laicolasse:~ # The manual says: STATIC the static settings have to be merged together with the dynamic settings. STATIC_FALLBACK the static settings have to be used only, when no dynamic are available. I should like "STATIC". Laicolasse:~ # grep "NETCONFIG_DNS_STATIC_SEARCHLIST\|NETCONFIG_DNS_STATIC_SERVERS\|NETCONFIG_DNS_FORWARDER\|NETCONFIG_DNS_POLICY" /etc/sysconfig/network/config | egrep -v "^[[:space:]]*$|^#" NETCONFIG_DNS_POLICY="STATIC" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Laicolasse:~ # netconfig update -f Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search valinor nameserver 127.0.0.1 Laicolasse:~ # Well, I do not see that it merges the ISP DNS with my settings One of the combos I did yesterday produced that. Ah, this one: ]> /etc/sysconfig/network/config ]> ]> NETCONFIG_FORCE_REPLACE="no" ]> NETCONFIG_DNS_POLICY="auto" ]> NETCONFIG_DNS_FORWARDER="dnsmasq" ]> NETCONFIG_DNS_FORWARDER_FALLBACK="yes" ]> ]> This produces in /etc/resolv.conf: ]> ]> search Laicolasse.valinor ]> nameserver 127.0.0.1 ]> nameserver 80.58.61.254 ]> nameserver 80.58.61.250 Ok, if I now change NETCONFIG_DNS_POLICY to auto, I get: Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250 Laicolasse:~ # Ah, see, the search line is broken. That's why I have to use STATIC. It is impossible to get the damn file completely right. I have: NETCONFIG_DNS_STATIC_SEARCHLIST="valinor valinor" I don't remember why that duplicate, must have been years ago. Let's try. NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_POLICY="auto" Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250 Laicolasse:~ # No, broken search line. Best combo: NETCONFIG_DNS_POLICY="STATIC" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="valinor" NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search valinor nameserver 127.0.0.1 Laicolasse:~ # -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
lease { [snip] } Laicolasse:~ #
See? No search item.
Yes I see it - with that, we can deduce your weird searchlist setting is coming from your system itself.
And an ntp item I knew nothing about.
Bit of an odd one, with no route to 10.x.x.x, it's pointless. Do you see it in your chrony/ntp config? (just being curious). You can probably access it if you add a route for that network.
Ok, if I now change NETCONFIG_DNS_POLICY to auto, I get:
Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250 Laicolasse:~ #
Ah, see, the search line is broken.
Yes, that is the real issue. I have no idea why the hostname is being prepended. Wild guess - anything odd in /etc/hosts ?
It is impossible to get the damn file completely right.
Well, it works for me, so we just have to figure out what's wrong with yours. -- Per Jessen, Zürich (5.2°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-04-05 12:30, Per Jessen wrote:
Carlos E. R. wrote:
lease { [snip] } Laicolasse:~ #
See? No search item.
Yes I see it - with that, we can deduce your weird searchlist setting is coming from your system itself.
Yes.
And an ntp item I knew nothing about.
Bit of an odd one, with no route to 10.x.x.x, it's pointless. Do you see it in your chrony/ntp config? (just being curious). You can probably access it if you add a route for that network.
Oh, I can alright: Laicolasse:~ # traceroute 10.22.64.1 traceroute to 10.22.64.1 (10.22.64.1), 30 hops max, 60 byte packets 1 router.valinor (192.168.1.1) 2.509 ms 2.587 ms 2.722 ms 2 * * * 3 * * * 4 * * * Maybe it responds to a time request. It is external, on the ISP network. The router has an VLAN for it, I think (not documented). Laicolasse:~ # grep 10.22.64.1 /etc/chrony* /etc/chrony.conf:pool 10.22.64.1 iburst grep: /etc/chrony.d: Is a directory Laicolasse:~ # grep 10.22.64.1 /etc/chrony*/* Laicolasse:~ # Wow, it is there indeed. :-o Does it work?
Laicolasse:~ # grep 10.22.64.1 /var/log/messages 2023-04-05T04:07:32.570230+02:00 Laicolasse chronyd[1844]: Source 10.22.64.1 offline 2023-04-05T11:00:51.733335+02:00 Laicolasse chronyd[1844]: Source 10.22.64.1 online 2023-04-05T12:26:23.161658+02:00 Laicolasse chronyd[1844]: Source 10.22.64.1 offline 2023-04-05T12:26:33.960313+02:00 Laicolasse chronyd[1844]: Source 10.22.64.1 online Laicolasse:~ #
It seems to work, yes. :-o Means I can not define a 10* network myself. I think virtualbox does. What port uses chrony? Ah, 123. TCP or UDP? Trying both. Laicolasse:~ # traceroute --port=123 --protocol=TCP 10.22.64.1 traceroute to 10.22.64.1 (10.22.64.1), 30 hops max, 60 byte packets 1 * router.valinor (192.168.1.1) 22.276 ms 1.400 ms 2 * * * 3 * * router.valinor (192.168.1.1) 2600.757 ms 4 router.valinor (192.168.1.1) 2.602 ms 1.347 ms * 5 * * * 6 * * * 7 * * * 8 * * * ... 30 * * * Laicolasse:~ # Laicolasse:/etc/NetworkManager/dispatcher.d # traceroute --port=123 --protocol=UDP 10.22.64.1 traceroute to 10.22.64.1 (10.22.64.1), 30 hops max, 60 byte packets 1 router.valinor (192.168.1.1) 3.854 ms 1.666 ms 1.385 ms 2 * * * 3 * * * 4 * * * ... 30 * * * Laicolasse:/etc/NetworkManager/dispatcher.d #
Ok, if I now change NETCONFIG_DNS_POLICY to auto, I get:
Laicolasse:~ # tail /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search Laicolasse.valinor nameserver 127.0.0.1 nameserver 80.58.61.254 nameserver 80.58.61.250 Laicolasse:~ #
Ah, see, the search line is broken.
Yes, that is the real issue. I have no idea why the hostname is being prepended. Wild guess - anything odd in /etc/hosts ?
It is impossible to get the damn file completely right.
Well, it works for me, so we just have to figure out what's wrong with yours.
My laptop uses NM, I think your machine doesn't. I have just made an adjust to the /etc/hosts file, now it contains a proper entry for the hostname. So let's try again. No. still "search Laicolasse.valinor". In case you are curious, I have "/etc/NetworkManager/dispatcher.d/90mine" which updates /etc/hosts dynamically to the actual IP address I get each time. I just activated this minutes ago. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
And an ntp item I knew nothing about.
Bit of an odd one, with no route to 10.x.x.x, it's pointless. Do you see it in your chrony/ntp config? (just being curious). You can probably access it if you add a route for that network.
Oh, I can alright:
Laicolasse:~ # traceroute 10.22.64.1 traceroute to 10.22.64.1 (10.22.64.1), 30 hops max, 60 byte packets 1 router.valinor (192.168.1.1) 2.509 ms 2.587 ms 2.722 ms 2 * * * 3 * * * 4 * * *
That just uses the default route, that won't work. If you want to play with it, you could try: ip addr add 10.22.64.99/24 dev wlan0 maybe you can then "ntpq 10.22.64.1". or do you already have a route for it? try "ip route show" first.
Does it work?
Try this: chronyc sources
Means I can not define a 10* network myself.
No it doesn't. You can still use 10.113.0.0, for instance.
Well, it works for me, so we just have to figure out what's wrong with yours.
My laptop uses NM, I think your machine doesn't.
If my machine ("office68") had not been using NM, much of this exercise would have been pointless. -- Per Jessen, Zürich (9.2°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-04-05 15:04, Per Jessen wrote:
Carlos E. R. wrote:
And an ntp item I knew nothing about.
Bit of an odd one, with no route to 10.x.x.x, it's pointless. Do you see it in your chrony/ntp config? (just being curious). You can probably access it if you add a route for that network.
Oh, I can alright:
Laicolasse:~ # traceroute 10.22.64.1 traceroute to 10.22.64.1 (10.22.64.1), 30 hops max, 60 byte packets 1 router.valinor (192.168.1.1) 2.509 ms 2.587 ms 2.722 ms 2 * * * 3 * * * 4 * * *
That just uses the default route, that won't work.
If you want to play with it, you could try:
ip addr add 10.22.64.99/24 dev wlan0
maybe you can then "ntpq 10.22.64.1".
or do you already have a route for it? try "ip route show" first.
I said that it does work, I get the time from them. I just failed to ping or tracerute them because they don't respond to pings. Laicolasse:~ # ip route show default via 192.168.1.1 dev wlan0 proto dhcp metric 600 192.168.0.0/16 dev wlan0 proto kernel scope link src 192.168.2.18 metric 600 Laicolasse:~ #
Does it work?
Try this: chronyc sources
Laicolasse:~ # chronyc sources MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^- 10.22.64.1 6 9 275 20m +8995us[+9154us] +/- 168ms ^- b.st1.ntp.br 2 10 337 322 +2985us[+2985us] +/- 154ms ^+ ntppublic.uzh.ch 2 10 317 331 -3371us[-3371us] +/- 65ms ^+ 51-158-147-92.rev.poneyt> 2 10 375 907 -12ms[ -13ms] +/- 67ms ^+ server2.as2.ch 2 9 276 711 -5153us[-5829us] +/- 50ms ^+ dns4.masbytes.es 2 9 177 243 +4194us[+4194us] +/- 119ms ^+ gomadr.hojmark.net 2 10 373 87 -9835us[-9835us] +/- 59ms ^* 185.179.104.12 2 10 377 558 +2828us[+2152us] +/- 42ms ^+ 190.pool90-165-120.dynam> 2 9 367 104 -8711us[-8711us] +/- 54ms Laicolasse:~ #
Means I can not define a 10* network myself.
No it doesn't. You can still use 10.113.0.0, for instance.
I don't know what sections of the 10.* range telefónica is using. Probably the entire range, for clients, instead of using IPv6, remember. They use CGNAT. Not on landlines, apparently.
Well, it works for me, so we just have to figure out what's wrong with yours.
My laptop uses NM, I think your machine doesn't.
If my machine ("office68") had not been using NM, much of this exercise would have been pointless.
Ah, ok. Missed that. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 2023-04-04 01:25, Carlos E. R. wrote: Summary: want to setup /etc/resolv.conf using NM (Network Manager) and dnsmasq. Do not configure DNS servers in NM. In /etc/sysconfig/network/config, do: NETCONFIG_DNS_POLICY="STATIC" NETCONFIG_DNS_FORWARDER="dnsmasq" NETCONFIG_DNS_FORWARDER_FALLBACK="yes" NETCONFIG_DNS_STATIC_SEARCHLIST="your_domain" NETCONFIG_DNS_STATIC_SERVERS="127.0.0.1" Then run "/run/netconfig/resolv.conf". This should result in an /etc/resolv.conf like this: Laicolasse:~ # cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" search your_domain nameserver 127.0.0.1 Laicolasse:~ # Notice that "NETCONFIG_DNS_FORWARDER_FALLBACK" doesn't work, so we do something else. Edit /etc/dnsmasq.conf: resolv-file=/run/NetworkManager/no-stub-resolv.conf #no-resolv Add dns servers of your choice, if/as wanted: # resolver4.opendns.com server=208.67.222.222 # resolver2.opendns.com server=208.67.222.220 # http://www.privacyfoundation.ch/ server=77.109.138.45 server=77.109.138.29 # https://digitalcourage.de/support/zensurfreier-dns-server server=85.214.20.141 #clooudfare server=1.1.1.1 server=1.0.0.1 # Google servers #server=8.8.8.8 #server=8.8.4.4 local=/your_domain/ Create or edit /etc/apparmor.d/local/usr.sbin.dnsmasq: # Site-specific additions and overrides for 'usr.sbin.dnsmasq' /run/NetworkManager/no-stub-resolv.conf r, Restart services: systemctl restart apparmor.service systemctl restart dnsmasq.service I think that's all :-) -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
participants (4)
-
Andrei Borzenkov
-
Bob Rogers
-
Carlos E. R.
-
Per Jessen