<div dir="ltr"><div>hi,</div><div><br></div><div>Apologies if this is not the proper forum for asking this question.</div><div><br></div><div>on a rhel 7.9 host, dnsmasq is not properly forwarding queries to some internal domains.</div><div><br></div><div>If I run dnsmasq on the foreground with the same configuration, it works fine (only resolving the specified domains)<br></div><div><br></div><div>Let's see:</div><div><br></div><div>interface=some-bridge-name<br>#bind-dynamic<br><br><br>domain-needed  # do not forward short names<br>bogus-priv     # drop non routed address spaces<br>no-resolv      # do not resolve anything, only whitelist allowed which follows<br><br># whitelisted dns domains<br>server=/domain.local/10.xxx.xxx.xx<br>server=/domain.local/10.1xxx.xxx.xx<br>server=/other.sub.tld/10.1xxx.xxx.xx<br>server=/other.sub.tld/10.1xxx.xxx.xx<br><br># all other domains go to localhost<br>address=/#/<a href="http://127.0.0.1">127.0.0.1</a><br><br>cache-size=1000<br><br>log-queries<br>log-facility=/var/log/dnsmasq.log<br></div><div><br></div><div><br></div><div>And obviously in /etc/resolv.conf</div><div><br></div><div>nameserver 127.0.0.1</div><div><br></div><div>So, if I restart NetworkMangager, because I added <br></div><div><br></div><div># cat /etc/NetworkManager/conf.d/00-use-dnsmasq.conf<br># FILE MANAGED BY TEMPLATE<br># DO NOT MODIFY LOCALLY ALL CHANGES WILL BE OVERWRITTEN<br><br>[main]<br>dns=dnsmasq</div><div><br></div><div>dnsmasq is automatically started (the dnsmaqs systemd service unit is disabled)</div><div><br></div><div><br></div><div>I query a host in the sub.domain.tld and I have a timeout in dig, no servers could be reached.<br></div><div><br></div><div><br></div><div>in the dnsmasq.log:</div><div>Dec 14 16:36:41 dnsmasq[7508]: query[A] host.sub.domain.tld from 127.0.0.1<br>Dec 14 16:36:41 dnsmasq[7508]: forwarded host.sub.domain.tld to 10.xxx.xxx.xx<br>Dec 14 16:36:41 dnsmasq[7508]: forwarded host.sub.domain.tld to 10.xxx.xxx.xx<br>Dec 14 16:36:46 dnsmasq[7508]: query[A] host.sub.domain.tld from 127.0.0.1<br>Dec 14 16:36:46 dnsmasq[7508]: forwarded host.sub.domain.tld to 10.xxx.xxx.xx<br>Dec 14 16:36:46 dnsmasq[7508]: forwarded host.sub.domain.tld to 10.xxx.xxx.xx</div><div><br></div><div>Ok, nou I kill dnsmasq, start it with --no-daemon</div><div><br></div><div>and then it works, dnsmasq forwards correctly.<br></div><div><br></div><div>In both cases I see a listening socket on the right interface port 53 {udp,tcp}.</div><div><br></div><div>What am I doing wrong? <br></div><div><br></div><div>Selinux shows no denials (avc empty). I turned it off (permissive), still no improvement.</div><div><br></div><div>Any help greatly appreciated.</div><div><br></div><div>-- <br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Regards,<br>natxo</div></div></div>