For some reason my Postman presumably uses a local network nameserver (adverised via dhcp and proxied systemd-resolved) instead of the ones that are specified in /etc/resolv.conf and i'm looking to resolve that.
I have a number of problematic domains that points to addresses in my corporate VPN, and everything works fine except Postman. I can't disclose the domains in question, so i'll go with %host% to illustrate the examples.
I have a following setup on my machine:
- systemd-resolved on 127.0.0.53 that picks up ISP-defined DNS servers advertised by my routerthat i don't even know and proxies them
- dnsmasq listening on 127.0.0.1 using 127.0.0.53, 8.8.8.8 and 8.8.4.4 as backing servers (so that i get domains existing only on local machine in dnsmasq config, existing only in local network, such as ISP domain for my router, and all the global records then)
- /etc/resolv.conf by default points to 127.0.0.1
- My corporate VPN, when it is turned on, overwrites /etc/resolv.conf during operation with two 10.x.x.x servers
- /etc/nsswitch.conf (yes, it has to be brought in normal state) currently contains
hosts: mymachines dns mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname - both corporate DNS and global DNS contain %host% pointing to a couple of 10.x.x.x load balancers
- OS in question is Manjaro, Postman is installed using Flatpak/Flathub
Following scenarios further describe the situation:
getent hosts / ahosts %host%correctly resolve address- When i do
dig %host%ordig %host% 127.0.0.1, regardless if my corporate VPN is turned on or off, i get correct addresses - When i do
dig %host% 127.0.0.53, then it's the only server i've tried that does not know about the %host% (this is the systemd-resolved that proxies dhcp-advertised servers) - When i spin up nodejs and use the dns module, %host% is correctly resolved
- curl requests copied from Postman work fine without any modification
- However, Postman queries to %host% always fail with
Error: getaddrinfo ENOTFOUND %host% - At the same time, queries to hosts that are known to 127.0.0.53 are executed through Postman just fine
- Restfox, which is, as far as i know, a fork of Postman, works absolutely fine
What could be the reason and how can i change DNS server in Postman? I see that the error attributes to getaddrinfo, so a system call is responsible for not seeing the domain, yet i doubt that nothing of what i've tried is using the very same getaddrinfo.