You are not logged in.
Hi,
I'm running dnsmasq on my server and I want to fetch data from a weather service.
The application is trying to connect to subdomain api.openweathermap.org.
Verifying the issue with nslookup confirms the DNS issue:
root@pc5-loxberry:~# nslookup api.openweathermap.org
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find api.openweathermap.org: SERVFAIL
After executing dig a api.openweathermap.org the name resolution works:
root@pc5-loxberry:~# dig a api.openweathermap.org
; <<>> DiG 9.11.5-P4-5.1+deb10u2-Raspbian <<>> a api.openweathermap.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58267
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;api.openweathermap.org. IN A
;; ANSWER SECTION:
api.openweathermap.org. 2560 IN A 82.196.7.246
api.openweathermap.org. 2560 IN A 37.139.20.5
api.openweathermap.org. 2560 IN A 37.139.1.159
api.openweathermap.org. 2560 IN A 188.166.16.132
;; Query time: 31 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mi Dez 16 21:12:38 CET 2020
;; MSG SIZE rcvd: 115
root@pc5-loxberry:~# nslookup api.openweathermap.org
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
Name: api.openweathermap.org
Address: 37.139.20.5
Name: api.openweathermap.org
Address: 82.196.7.246
Name: api.openweathermap.org
Address: 188.166.16.132
Name: api.openweathermap.org
Address: 37.139.1.159
** server can't find api.openweathermap.org: SERVFAIL
Can I configure dnsmasq for a working name resolution of subdomain api.openweathermap.org?
Last edited by cmonty14 (2020-12-17 07:01:58)
Offline
Please edit your post to use code tags.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
; <<>> DiG 9.11.5-P4-5.1+deb10u2-Raspbian <<>> a api.openweathermap.org
Ahemm…
Sounds more like an issue w/ your nsswitch and one element before dns triggers a return (typically for the "!UNAVAIL=return" stanza)
Dig will just perform a DNS lookup and the response likely feed the cache for the previous element.
systemd-resolved? mdns?
Online
Root cause:
Wrong netmask configured in router (in client mode) that is providing DNS
Offline