{"id":13582206,"url":"https://github.com/openshift/coredns-mdns","last_synced_at":"2025-04-04T05:06:42.485Z","repository":{"id":48470232,"uuid":"172156999","full_name":"openshift/coredns-mdns","owner":"openshift","description":"CoreDNS plugin that serves .local mDNS info over normal DNS","archived":false,"fork":false,"pushed_at":"2024-10-01T14:28:34.000Z","size":3498,"stargazers_count":46,"open_issues_count":3,"forks_count":24,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-01-01T09:05:09.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openshift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-23T01:26:14.000Z","updated_at":"2024-12-27T14:05:57.000Z","dependencies_parsed_at":"2024-01-13T03:01:21.511Z","dependency_job_id":"5d72f2a6-4853-4d41-8890-4445ba383aa7","html_url":"https://github.com/openshift/coredns-mdns","commit_stats":{"total_commits":86,"total_committers":6,"mean_commits":"14.333333333333334","dds":0.2674418604651163,"last_synced_commit":"1b73907c925f6f57b99d6b88ceee4b7e8ca90026"},"previous_names":["openshift-metalkube/coredns-mdns"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcoredns-mdns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcoredns-mdns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcoredns-mdns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcoredns-mdns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openshift","download_url":"https://codeload.github.com/openshift/coredns-mdns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123104,"owners_count":20887261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:29.673Z","updated_at":"2025-04-04T05:06:42.466Z","avatar_url":"https://github.com/openshift.png","language":"Go","funding_links":[],"categories":["Go","External Plguins"],"sub_categories":[],"readme":"# mDNS\n\n## Name\n\nmDNS - CoreDNS plugin that reads mDNS records from the local network and responds\nto queries based on those records.\n\n## Description\n\nUseful for providing mDNS records to non-mDNS-aware applications by making them\naccessible through a standard DNS server.\n\n## Syntax\n\n~~~\nmdns example.com [minimum SRV records] [filter text] [bind address]\n~~~\n\n## Examples\n\nAs a prerequisite to using this plugin, there must be systems on the local\nnetwork broadcasting mDNS records. Note that the .local domain will be\nreplaced with the configured domain. For example, `test.local` would become\n`test.example.com` using the configuration below.\n\nSpecify the domain for the records.\n\n~~~ corefile\nexample.com {\n\tmdns example.com\n}\n~~~\n\nAnd test with `dig`:\n\n~~~ txt\ndig @localhost baremetal-test-extra-1.example.com\n\n;; ANSWER SECTION:\nbaremetal-test-extra-1.example.com. 60 IN A   12.0.0.24\nbaremetal-test-extra-1.example.com. 60 IN AAAA fe80::f816:3eff:fe49:19b3\n~~~\n\nIf `minimum SRV records` is specified in the configuration, the plugin will wait\nuntil it has at least that many SRV records before responding with any of them.\n`minimum SRV records` defaults to `3`.\n\n~~~ corefile\nexample.com {\n    mdns example.com 2\n}\n~~~\n\nThis would mean that at least two SRV records of a given type would need to be\npresent for any SRV records to be returned. If only one record is found, any\nrequests for that type of SRV record would receive no results.\n\nIf `filter text` is specified in the configuration, the plugin will ignore any\nmDNS records that do not include the specified text in the service name. This\nallows the plugin to be used in environments where there may be mDNS services\nadvertised that are not intended for use with it. When `filter text` is not\nset, all records will be processed.\n\n~~~ corefile\nexample.com {\n    mdns example.com 3 my-id\n}\n~~~\n\nThis configuration would ignore any mDNS records that do not contain the\nstring \"my-id\" in their service name.\n\nIf `bind address` is specified in the configuration, the plugin will only send\nmDNS traffic to the associated interface. This prevents sending multicast\npackets on interfaces where that may not be desirable. To use `bind address`\nwithout setting a filter, set `filter text` to \"\".\n\n~~~ corefile\nexample.com {\n    mdns example.com 3 \"\" 192.168.1.1\n}\n~~~\n\nThis configuration will only send multicast packets to the interface assigned\nthe `192.168.1.1` address. The interface lookup is dynamic each time an mDNS\nquery is sent, so if the address moves to a different interface the plugin\nwill automatically switch to the new one.\n\n## Service Discovery\n\nQueries to mDNS are constrained to the `local` domain, alternative domains that an mDNS server publishes are not supported by this plugin. This does not restrict you to `.local` TLD, as the address is referenced from the service responses belonging to the `local` domain.\n\nIf you have multiple network interfaces that respond to mDNS for your host(eg on the same system that CoreDNS is running), this can result in the wrong IP address returned for a hostname due to a race condition with multicast. Make sure you configure your mDNS server to whitelist the network interface with the assigned IP address you want to associate the hostname to.\n\nIf a query is not responding, check the log for hosts discovered by this plugin reported as `mdnsHosts`. The plugin will populate `mdnsHosts` by **only discovering** mDNS services of the type `_workstation._tcp`.\n\n### Publishing `_workstation._tcp` service with Avahi\n\nAvahi is commonly installed on Linux systems as the default mDNS server. Your distro may have it configured to publish this service by default, however distros that [follow upstream defaults](https://github.com/lathiat/avahi/blob/d1e71b320d96d0f213ecb0885c8313039a09f693/avahi-daemon/avahi-daemon.conf#L50) have this feature disabled for security reasons. While it is not required to be enabled to respond to explicit requests, it is required for service discovery over mDNS which this plugin relies on.\n\nYou can list the results `coredns-mdns` will discover with: `avahi-browse --resolve --terminate _workstation._tcp`\n\nIf your hostname is missing but can be resolved with `avahi-resolve --name your-hostname-here.local`, it needs to be published as a workstation service.\n\nEdit `/etc/avahi/avahi-daemon.conf`:\n\n```\n[publish]\npublish-workstation=yes\n```\n\nIf the hostname is defined by `avahi-publish --address \u003chostname\u003e \u003cip\u003e`, `/etc/avahi/hosts`, or other means like D-Bus, you can publish the workstation service to point to that hostname with: \n\n`avahi-publish --service friendly_name _workstation._tcp 9`\n\n- The last argument is an associated port for the service, it is not important for this plugin but a value is required to publish.\n- You can use `--host=\u003chostname\u003e` to choose a value that differs from the default Avahi `host-name` in `/etc/avahi/avahi-daemon.conf`. This should be an FQDN value, the TLD should be appended to it (eg, `--host=your-hostname-here.local`)\n- By default it will be published under the `local` domain which `coredns-mdns` searches.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fcoredns-mdns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenshift%2Fcoredns-mdns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fcoredns-mdns/lists"}