<div dir="ltr"><div>hi,</div><div><br></div><div>very strange.</div><div><br></div><div>If in the dracut config kernel_cmdline a nameserver is specified for a static ip adress assignment (we are using network bound disk encryption, that's why), then dnsmasq does not forward the queries. Remove the nameserver directive, then it works (we disable the ifcfg module as well, so dracut does not manage our network settings).</div><div><br></div><div>Ok, fixed it, strange but it works.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 14, 2021 at 4:50 PM Natxo Asenjo <<a href="mailto:natxo.asenjo@gmail.com">natxo.asenjo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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" target="_blank">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">Regards,<br>natxo</div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">--<br>Groeten,<br>natxo</div>