for https://github.com/KIMB-technologies/Radio-API
See the Docker Image at https://hub.docker.com/r/kimbtechnologies/radio_dns
Github Action build of https://github.com/KIMB-technologies/Radio-DNS-Server
The configuration is done using env variables.
SERVER_BIND
(optional, default0.0.0.0
) The IP address the server binds on.0.0.0.0
binds on all interfaces.SERVER_PORT
(optional, default53
) The port which is used for the DNS server, should always be the default53
(unless for testing).SERVER_UPSTREAM
(optional, default8.8.8.8
) The upstream DNS server, where DNS answers are fetched fromRADIO_DOMAIN
(required, ifRADIO_IP
not set) The domain where the Radio-API can be found. The DNS server will return theA
record of this domain for all queries containingwifiradiofrontier.com
.RADIO_IP
(required, ifRADIO_DOMAIN
not set) The ip address where the Radio-API can be found. The DNS server will return this IP for all queries containingwifiradiofrontier.com
. IfRADIO_DOMAIN
is set, it will be used. IfRADIO_DOMAIN
is not set,RADIO_IP
will be used!ALLOWED_DOMAIN
(optional, defaultall
) Normally a DNS resolver will answer all queries from all sources. This can be a security risk, so one should only answer the queries from trusted sources. One can give a list (domain names divided by,
) of domain name here, only queries from the correspondingA
records will be answered then. The default value isall
which means all sources are trusted. E.g. for testing and usage in local networks. (Normally giving your DynDNS name is right; More domain names lead to a higher response time to queries.)TIME_SERVER
(optional, defaultntp0.fau.de
) If the DNS server is queried fortime.wifiradiofrontier.com
it will answer with theA
record of this domain. So one does not have to host an own NTP server atRADIO_DOMAIN
. Per default some time server is used.ENABLE_UPDATE
(optional, defaultfalse
) Set totrue
to enable responding to DNS queries forupdate.wifiradiofrontier.com
with theA
record ofupdate.wifiradiofrontier.com
instead of the ip of Radio-API. (This will allow the radio to do updates. Performing updates is a trade-off between risking changes to the API, that may prevent Radio-API from working, and bug fixes and security implications for the radio's software.)
Run using the Docker-compose Example!
- Alpine Docker Image
- Python 3
- Python DnsLib
- Code inspired from DNSServer
MIT License, Copyright (c) 2017 Samuel Colvin - Regex Pattern from Validators used
MIT License, Copyright (c) 2013-2014 Konsta Vesterinen