CoreDNS is configured using a configuration file called a Corefile which supports variable substitution so values can be provided using environment variables.
Name | Required | Type | Notes |
---|---|---|---|
controller_url | ✅ | string | address of the Omada controller. Include https:// prefix |
site | ✅ | string | name of the site from the Omada controller (note this is case sensitive) |
username | ✅ | string | Omada controller username |
password | ✅ | string | Omada controller password |
refresh_minutes | ❌ | int | how often to refresh the zones (default 1 minute) |
refresh_login_hours | ❌ | int | how often to refresh the login token (default 24 hours) |
For this service you should create a new user in the Admin
page of the controller with a Viewer
role.
This will depend on your network and configuration, but due to the lack of a suitable internal DNS resolution you may need to disable HTTPS verification to the controller, as even if you have a valid certificate on your controller you need a valid DNS record pointing to your controller where coredns is running.
HTTPS verification can be disabled by setting environment variable OMADA_DISABLE_HTTPS_VERIFICATION
to true
An option to keep HTTPS verification enabled is to create a public DNS A record pointing to your controllers private IP address.
See Corefile
. {
health :8080
omada {
controller_url {$OMADA_URL}
site {$OMADA_SITE}
username {$OMADA_USERNAME}
password {$OMADA_PASSWORD}
refresh_minutes 1
}
forward . {$UPSTREAM_DNS}
}
debug
will enable debug logging which will include debug logs from the omada pluginlog
will enable query/response logging for queries which are forwarded to the upstream dns server
. {
log
debug
health :8080
omada {
controller_url {$OMADA_URL}
site {$OMADA_SITE}
username {$OMADA_USERNAME}
password {$OMADA_PASSWORD}
refresh_minutes 1
}
forward . {$UPSTREAM_DNS}
}