How can I disable LLMNR in systemd-resolved
?
I tried adding: LLMNR=no
to /etc/systemd/resolved.conf
but when I type systemd-resolve --status
it still shows
LLMNR setting: yes
I have tried rebooting computer and restarting systemd-resolved.service
There's a general LLMNR setting and a per link LLMNR setting
There's the LLMNR setting in
systemd-resolved
and there's also the per-link LLMNR setting insystemd-networkd
.The setting you're looking at in the
systemd-resolve --status
output is actually the one fromsystemd-networkd
. Except that, if you're not runningsystemd-networkd
, it will STILL showLLMNR setting: yes
.The default setting will show something like this:
It also means
systemd-resolved
will be taking requests on UDP port 5355 (the LLMNR port), on these interfaces.Changing resolved.conf file will change "Current Scopes:" line
If you disable it by setting
LLMNR=no
inresolved.conf
and restartingsystemd-resolved
, then you get:You can see that the scope changed from
DNS LLMNR/IPv4 LLMNR/IPv6
to justDNS
. So it will use DNS only and will no longer take requests on UDP port 5355.Changing *.network file will change "LLMNR setting:" line
If you're also using
systemd-networkd
, you can further disable LLMNR on that interface, by settingLLMNR=no
in the[Network]
section of the*.network
file for that interface.For example:
After setting that and restarting
systemd-networkd
, the output ofsystemd-resolve --status
will include:Summary
So, in short,
LLMNR setting: yes
just means that it wasn't explicitly disabled on that interface. And it can only be disabled on that interface if it's being managed bysystemd-networkd
. If you disable it through resolved itself, it will essentially have the same effect, but it will only show in the list of current scopes, and not really underLLMNR setting
.NOTE: Some pointers to the code showing that
LLMNR=yes
is the default setting here and here.