Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:guide-developer:mdns [2021/05/04 21:49] – /etc/umdns stokito | docs:guide-developer:mdns [2024/10/17 00:59] (current) – [Config File] bartprokop | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| //This is early stage documentation, | //This is early stage documentation, | ||
| - | mDNS, also known as Bonjour or zero-configuration networking, enables automatic discovery of computers, devices, and services on IP networks. It is an internet standard documented in [[https:// | + | mDNS, also known as Bonjour or zero-configuration networking |
| The [[packages: | The [[packages: | ||
| ==== Alternatives ==== | ==== Alternatives ==== | ||
| - | + | See [[docs:guide-user: | |
| - | * mdnsd - provided by Apple' | + | |
| - | * [[https:// | + | |
| ==== Config File ==== | ==== Config File ==== | ||
| <code - / | <code - / | ||
| config umdns | config umdns | ||
| - | | + | option jail 1 # enables jail - see procd |
| - | list network lan | + | list network lan |
| - | list network dmz # Provides visibility into both networks, but does not act as a repeater | + | list network dmz # Provides visibility into both networks, but does not act as a repeater |
| </ | </ | ||
| + | |||
| Note that it may be unsafe to enable umdns on '' | Note that it may be unsafe to enable umdns on '' | ||
| + | |||
| + | Note that '' | ||
| + | |||
| + | ==== Install ==== | ||
| + | umdns is available starting from OpenWRT 17 and to install it execute '' | ||
| + | |||
| + | ==== Firewall ==== | ||
| + | If you need to advertise on WAN or other networks then UDP port 5353 should be opened in firewall: | ||
| + | <code - / | ||
| + | config rule | ||
| + | option src_port ' | ||
| + | option src ' | ||
| + | option name ' | ||
| + | option target ' | ||
| + | option dest_ip ' | ||
| + | option dest_port ' | ||
| + | option proto ' | ||
| + | </ | ||
| + | To configure from GUI see " | ||
| ==== Browsing announced services ==== | ==== Browsing announced services ==== | ||
| Line 80: | Line 97: | ||
| The umdns scans all the services listed in ubus ('' | The umdns scans all the services listed in ubus ('' | ||
| < | < | ||
| - | # ubus call service list | jsonfilter -e '@[*].instances[*].data.mdns' | + | # ubus call service list | jsonfilter -e "$[*]['instances'][*]['data' |
| { " | { " | ||
| </ | </ | ||
| Line 105: | Line 122: | ||
| If you wish to create a more complicated mdns information block, see '' | If you wish to create a more complicated mdns information block, see '' | ||
| - | Alternatively you can create a service | + | ===== Service |
| + | umdns advertises the services whose '' | ||
| + | |||
| + | For example the same WebDAV service description: | ||
| <code - / | <code - / | ||
| { | { | ||
| Line 118: | Line 138: | ||
| } | } | ||
| </ | </ | ||
| - | See examples in [[commit>? | + | Or you can advertise SFTP and SSH: |
| + | <code - / | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | See more examples in [[commit>? | ||
| + | |||
| + | The reload the umdns service with: '' | ||
| + | |||
| + | ==== Testing === | ||
| + | To see that service was advertised you may use '' | ||
| + | To see from a command line use '' | ||
| + | To find a specific service use: '' | ||