2015-12-13 10:46:24 +00:00
|
|
|
# PowerDNS-Admin
|
|
|
|
PowerDNS Web-GUI - Built by Flask
|
|
|
|
|
2015-12-13 11:07:10 +00:00
|
|
|
#### Features:
|
2015-12-13 11:07:59 +00:00
|
|
|
- Multiple domain management
|
2015-12-13 11:07:10 +00:00
|
|
|
- Local / LDAP user authentication
|
|
|
|
- User management
|
2016-05-27 06:03:59 +00:00
|
|
|
- User access management based on domain
|
2015-12-13 11:07:10 +00:00
|
|
|
- User activity logging
|
|
|
|
- Dashboard and pdns service statistics
|
|
|
|
|
2015-12-13 10:46:24 +00:00
|
|
|
## Setup
|
|
|
|
|
2016-05-27 06:03:59 +00:00
|
|
|
### PowerDNS Version Support:
|
|
|
|
PowerDNS-Admin supports PowerDNS autoritative server versions **3.4.2** and higher but does **not** yet support PowerDNS 4.0.0
|
|
|
|
|
2015-12-13 10:46:24 +00:00
|
|
|
### pdns Service
|
|
|
|
I assume that you have already installed powerdns service. Make sure that your `/etc/pdns/pdns.conf` has these contents
|
|
|
|
```
|
|
|
|
experimental-json-interface=yes
|
|
|
|
experimental-api-key=your-powerdns-api-key
|
|
|
|
webserver=yes
|
|
|
|
```
|
2015-12-13 11:01:48 +00:00
|
|
|
It will help to enable API access feature in PowerDNS so our PowerDNS-Admin can intergrate with backend services.
|
2015-12-13 10:46:24 +00:00
|
|
|
|
|
|
|
### Create Database
|
|
|
|
We will create a database which used by this web application. Please note that this database is difference from pdns database itself.
|
|
|
|
```
|
|
|
|
MariaDB [(none)]> CREATE DATABASE powerdnsadmin;
|
|
|
|
|
2016-02-14 06:51:42 +00:00
|
|
|
MariaDB [(none)]> GRANT ALL PRIVILEGES ON powerdnsadmin.* TO powerdnsadmin@'%' IDENTIFIED BY 'your-password';
|
2015-12-13 10:46:24 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### PowerDNS-Admin
|
|
|
|
|
2016-05-27 06:03:59 +00:00
|
|
|
In this installation guide, I am using CentOS 7 and run my python stuffs with *virtualenv*. If you don't have it, lets install it:
|
2015-12-13 10:46:24 +00:00
|
|
|
```
|
|
|
|
$ sudo yum install python-pip
|
|
|
|
$ sudo pip install virtualenv
|
|
|
|
```
|
|
|
|
|
|
|
|
In your python web app directory, create a `flask` directory via `virtualenv`
|
|
|
|
```
|
|
|
|
$ virtualenv flask
|
|
|
|
```
|
|
|
|
|
|
|
|
Enable virtualenv and install python 3rd libraries
|
|
|
|
```
|
|
|
|
$ source ./flask/bin/activate
|
|
|
|
(flask)$ pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
Web application configuration is stored in `config.py` file. Let's clone it from `config_template.py` file and then edit it
|
|
|
|
```
|
2016-04-13 16:11:10 +00:00
|
|
|
(flask)$ cp config_template.py config.py
|
2015-12-13 10:46:24 +00:00
|
|
|
(flask)$ vim config.py
|
|
|
|
```
|
|
|
|
|
|
|
|
Create database after having proper configs
|
2015-12-13 11:10:10 +00:00
|
|
|
```
|
2016-05-27 06:03:59 +00:00
|
|
|
(flask)% ./create_db.py
|
2015-12-13 11:10:10 +00:00
|
|
|
```
|
2015-12-13 10:46:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
Run the application and enjoy!
|
|
|
|
```
|
|
|
|
(flask)$ ./run.py
|
|
|
|
```
|
2015-12-13 10:58:26 +00:00
|
|
|
|
|
|
|
### Screenshot
|
|
|
|
![Alt text](http://i.imgur.com/wA5qy2d.png)
|