Lightweight PowerDNS management frontend
- During my IT management responsibilities I found some time to contribute to our team of engineers and company overall.
- Tired of looking for a decent PowerDNS frontend manager -> let's create our own.
- Should be lightweight, dead simple and could be easily modified if needed.
- No need for the 3rd party storage databases (MySQL, PostgreSQL, e.t.c. databases), complex frameworks -> direct communication with the PowerDNS using API
- Use PHP, HTML and JavaScript (jQuery) only
- Some extra security on top (OTP)
- Adding and removing zones
- Modifying records
- Adding records (A, TXT, CNAME, MX, SRV)
- DDNS minimal usage (check Wiki as well):
- PowerDNS
- Web server
- PHP
- PHP-FPM: 7.2.4
- Ubuntu: 18.04.5
- NGINX: 1.14.0
- Use at your own risk
- No input data has been validated (apart from adding . (dot) at the end of zones/records), so be careful
- If unsure -> add https + basic auth in front of PDNS Manager directory
- Feel free to contribute, correct the bugs, add extra functionality
- DDNS (via GET)
- DDNS (via POST)
- DDNS get IP from source request by default
- OTP can be turned off by setting secret to 'null' value: e.g. 'user' => array('password' => 'hash', 'secret' => null); and enabled/disabled via settings
- Protect credentials/token against bruteforcing
- Validate TXT record to have surrounding quotes
- Implement TOKEN -> ZONE / RECORD policy
- Implement USER -> ZONE / RECORD policy
- Multi-user support (credentials, zones, records)
- Validate content depending on the record type
- Pass status codes from PowerDNS API back to application API
- Cleanup
- PDNS_Helper -> prepare() -> array
- Minify everything
- Possibility to edit settings from the GUI (???)
- Possibility to edit credentials from the GUI (???)
- Clone the project
- Configure the web server (NGINX snippet) + enable PHP
location /pdns/api2 {
root /var/www/pdns.yourdns.com/pdns/api2;
try_files $uri /pdns/api2/index.php$is_args$args;
}
location / {
try_files $uri $uri/ =404;
}
- Fetch dependencies using composer (check composer.json to see what is needed)
- Navigate to https://pdns.yourdns.com -> you should see the login prompt and be able to "sign up"
- Save the received credentials to the '-sample.php' files and rename the files (credentials-sample.php and settings-sample.php) by removing '-sample'
- Enjoy...