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.0binds 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_IPnot set) The domain where the Radio-API can be found. The DNS server will return theArecord of this domain for all queries containingwifiradiofrontier.com.RADIO_IP(required, ifRADIO_DOMAINnot set) The ip address where the Radio-API can be found. The DNS server will return this IP for all queries containingwifiradiofrontier.com. IfRADIO_DOMAINis set, it will be used. IfRADIO_DOMAINis not set,RADIO_IPwill 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 correspondingArecords will be answered then. The default value isallwhich 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.comit will answer with theArecord 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 totrueto enable responding to DNS queries forupdate.wifiradiofrontier.comwith theArecord ofupdate.wifiradiofrontier.cominstead 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.)
Besides the domain wifiradiofrontier.com also the domain internetradiofrontier.com is considered as domain to tamper DNS queries for.
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