[Dnsmasq-discuss] No more random source port if "--enable-dbus" is used and NM plugin
Michael Aramanovich
arami02 at gmail.com
Sat Aug 8 11:04:09 BST 2020
пт, 7 авг. 2020 г. в 22:11, Geert Stappers <stappers at stappers.nl>:
> On Fri, Aug 07, 2020 at 07:09:52PM +0300, Michael Aramanovich wrote:
> >
> > However, the problem is still easily reproducible on Centos 7, Centos 8,
> > with dnsmasq 2.76 / 2.79 (and the most recent ones as well).
>
> Acknowlegde on the "and the most recent ones as well"
> ..
Reproducing the issue without NM will help to fingerpoint to dnsmasq ...
>
>
Well , I managed to reproduce the issue with the last version (just
compiled from git), without NM, and even without --enable-dbus :) , the
issue is more or less clear now:
Just run dnsmasq with the following parameters ("ens32" is the interface
name on my centos; change it to yours if it differs):
sudo dnsmasq --no-resolv --no-daemon --no-hosts --bind-interfaces
--listen-address=127.0.0.1 --cache-size=0 --server 8.8.8.8 at ens32
Every request to the upstream DNS server 8.8.8.8 will be sent by dnsmasq
with the SAME source port, randomly chosen at start up, the "--query-port"
option in the command line above will be ignored (and this is documented in
dnsmasq-man: "The query-port flag is ignored for any servers which have a
source address specified but the port may be specified directly as part of
the source address." ) Also, adding --min-port or --max-port will not
make sense.
But still there is no way to force dnsmasq to use a random port for every
upstream query if the upstream server is set with @interface.
Unfortunately, the NetworkManager uses DBus to set upstream name server via
SetServersEx, with argument 8.8.8.8 at ens32, which is basically the same as
setting it via conf or command line as in the example above. That's why I
thought initially that "--enable-dbus" is a culprit.
Regards,
Michael.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20200808/6f39f012/attachment.html>
More information about the Dnsmasq-discuss
mailing list