I’ve recently been playing with mDSN configuration in my home network, notably I wanted to prevent mDNS traffic in certain VLANs and especially I wanted to prevent the router to disclose its IP address via mDNS. While I know this can be achieved via dedicated firewall rules, I noticed that for each interface I defined on my Turris Omnia (TurrisOS 6.3.3), a foris-controller instance listening on port 5353 is being launched allowing clients to query the router itself.
Can anybody explain what’s the reason for this behaviour and how to prevent it? What if I want foris-controller to be active only on selected interfaces?
In my cursory layman’s view of the function and purpose of mDNS, you’re probably going about it the wrong way. You can find the function and behavior of mDNS in public sources for example (where port 5353 is listed)
mDNS is not configurable, its behavior is a property of … i think
=´=´=
Multicast DNS (mDNS) is a zero-configuration protocol that lets you perform DNS-like operations on the local network in the absence of a conventional, unicast DNS server. The protocol uses the same API, packet formats , and operating semantics as DNS, allowing you to resolve domain names on the local network. DNS Service Discovery (DNS-SD) is a protocol that allows clients to discover a list of named instances of services (such as test._ipps._tcp.local, or linux._ssh._tcp.local) in a domain using standard DNS queries. DNS-SD is most often used in conjunction with mDNS but isn’t dependent on it. They’re both used by many IoT devices, such as network printers, Apple TVs, Google Chromecast, Network-Attached Storage (NAS) devices, and cameras. Default port: 5353/UDP
1- If you deactivate mDNS, the state on foris controller (is acting as Multicast DNS responder) persists or not ? Isn’t there a direct connection to the mDNS protocol activity ?
2 - Excuse my reasoning as a less knowledgeable user
Not sure what you mean by “deactivate mDNS”, bottom line is that the router shouldn’t respond to a query unless a software such as, for instance, umdns or avahi is configured to. Still, even without any of this software installed, foris-controller is providing responses.
See an example of the output from dns-sd -q openwrt.local (“openwrt” is the hostname for my Turris Omnia)
DATE: ---Wed 19 Jul 2023---
11:38:22.789 ...STARTING...
Timestamp A/R Flags IF Name Type Class Rdata
11:38:22.790 Add 40000002 12 openwrt.local. Addr IN 192.168.x.1
You do not experience this behaviour in standard OpenWRT installation unless the afore mentioned software is installed and configured.
No worries, we are all learning, thanks a lot for your support.
Disabling umdns won’t change change the behaviour, in fact you can completely uninstall umdns but still you’ll get a response from the router as long as foris-controller is up and running.
/etc/init.d/foris-controller stop will do the trick but of course this will make the foris web interface unavailable.
@turris-admin It will be really great to have a foris-controller developer to chime in and provide some input and answer to my questions.
Awaiting some official answer, I managed to disable foris-controller acting as Multicast DNS responder removing the --zeroconf-enabled --zeroconf-port "${remote_port}" parameters from /etc/init.d/foris-controller procd init script.
Not ideal, as this will likely be overwritten with the next TurrisOS upgrade, nor I know what are the implications. Hope we can get some input from developers.
turris-admin isn’t a real user. It’s a special administrative account that can be used as a fallback when no normal forum administrator is available. Please don’t mention it.
The best way how to contact our developers it to send a message to our official support channel: tech.support@turris.cz. You can also write directly to our team members (you can find their e-mail addresses in Git commits) but this way isn’t reliable due to several reasons (e.g. some people leave our team and some other come, there are some transitions etc.).
I’d also like a solution to this. I prefer to run avahi for mDNS but for it to work properly I first need to use @aspadini 's suggested hack of editing /etc/init.d/foris-controller (thanks for figuring this one out!).
It would be great if there was some way to configure foris-controller so it wouldn’t listen on the mDNS port.