Coder Social home page Coder Social logo

xbgmsharp / yapdnsui Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 13.0 1.84 MB

Yet Another PowerDNS web interface

Home Page: http://xbgmsharp.github.io/yapdnsui

License: GNU General Public License v3.0

Shell 0.33% JavaScript 59.51% CSS 5.61% HTML 34.55%

yapdnsui's Introduction

yapdnsui

Yet Another PowerDNS web interface

The ultimate goal is to produce a slick web interface to PowerDNS that will let you fully operate your PowerDNS instance via the official PowerDNS API.

The application should let you do add/delete/update domains and records as well as graph statistics and list/update configuration items LIVE from one or multiple PowerDNS instance via the PowerDNS API.

In addition, the application should let you manage DNSSEC zones and zone metadata.

It is not just another PowerDNS UI, it is the first to use the PowerDNS API, therefor to be backend-agnostic and DNSSEC aware.

Currently, you can list the configuration and see live statistics in a graph and list all the domains and records for demonstration purpose.

You can checkout the web interface using the live demo running on OpenShift cloud.

You are welcome to contribute.

![yapdnsui_livestats] (https://github.com/xbgmsharp/yapdnsui/raw/master/misc/screenshot_livestats.png)

![yapdnsui_config] (https://github.com/xbgmsharp/yapdnsui/raw/master/misc/screenshot_config.png)

![yapdnsui_domains] (https://github.com/xbgmsharp/yapdnsui/raw/master/misc/screenshot_domains.png)

![yapdnsui_records] (https://github.com/xbgmsharp/pdnsui/raw/master/misc/screenshot_records.png)

yapdnsui Prereqs

You need NodeJS v0.10.x+ for this application to work.

It might work with lower requirements but I didn't test.

PowerDNS Prereqs

Yes, you need a PowerDNS server.

It can be either an Authoritative or a Recursor to try this application out.

You need to enable the PowerDNS API on your PowerDNS instances.

For an Authoritative instance, configure as follows:

# Allow webserver
webserver=yes
# IP Address of web server to listen on
webserver-address=127.0.0.1
# Port of web server to listen on
webserver-port=8081
# Web server access is only allowed from these subnets
webserver-allow-from=0.0.0.0/0,::/0
# Enable JSON and API
experimental-json-interface=yes
experimental-api-key=changeme

In addition, you might want to configure the default domain value:

# default-soa-mail      mail address to insert in the SOA record if none set in the backend
default-soa-mail=
# default-soa-name      name to insert in the SOA record if none set in the backend
default-soa-name=a.misconfigured.powerdns.server
# default-ttl   Seconds a result is valid if not set otherwise
default-ttl=3600
# soa-expire-default	Default SOA expire
soa-expire-default=604800
# soa-refresh-default	Default SOA refresh
soa-refresh-default=10800
# soa-retry-default	Default SOA retry
soa-retry-default=3600
  • Restart
$ /etc/init.d/pdns restart
  • Test
$ curl -v -H 'X-API-Key: changeme' http://localhost:8081/

Installing

  • Clone the repository
git clone https://github.com/xbgmsharp/yapdnsui
cd yapdnsui
  • Install dependencies
$ npm install
$ bower install
  • Start the application
$ npm start

Or manually, you can define an IP and the PORT by using environment variables.

$ HOST=127.0.0.1 PORT=8080 DEBUG=yapdnsui node bin/www

Note : yaPDNSui use a sqlite database to store PowerDNS instances details. You can access the PowerDNS server manage interface using the menu on the right.

Test using Docker

You can try yaPDNSui using Docker. Please refer to Docker.md

Secure yapdnsui

For security reasons, you may want to run a webserver (like Apache or Nginx) in front of your PowerDNS webserver as a reverse proxy using SSL. As a best pratice, it is recommended to apply use SSL for the traffic between the end-user and the application.

You can read this HOWTO Monitoring.md for further details.

For security reasons, you probably want to use the same webserver for authentication purpose.

You can read this mod_auth_ldap - Apache HTTP Server

You might want to use a SSL connection and authenticate your co-workers using the internal LDAP or database server of your company intranet.

Contributing to yapdnsui

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Use a specific branch for your changes (one bonus point if it's prefixed with 'feature/')
  • write tests, doc, commit and push until you are happy with your contribution
  • Send a pull request
  • Please try not to mess with the package, version, or history

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program comes without any warranty.

Credits

yapdnsui's People

Contributors

bitdeli-chef avatar johnyb avatar lennie avatar xbgmsharp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yapdnsui's Issues

Layout / Images not loading. Missing dependencies?

Hi there, I just wanted to try out your good looking yapdnsui but I must have done something terrible wrong.

This is how it looks:
broken layout

# node -v
v5.9.0
$ HOST=127.0.0.1 PORT=8080 DEBUG=yapdnsui node bin/www
--------
  yapdnsui Express server listening on port 8080 +0ms
db.list [{"id":1,"name":"localhost","url":"https://localhost:8053","password":"changeme","pdns_type":null,"pdns_id":null,"pdns_url":null,"pdns_daemon_type":null,"pdns_version":null,"pdns_config_url":null,"pdns_zones_url":null}]
GET / 304 252.333 ms - -
GET /bootstrap/dist/css/bootstrap.min.css 404 54.385 ms - 2822
GET /bootstrap/dist/css/bootstrap-theme.min.css 404 81.758 ms - 2822
GET /stylesheets/style.css 304 2.001 ms - -
GET /stylesheets/gh-fork-ribbon.css 304 1.848 ms - -
GET /font-awesome/css/font-awesome.min.css 404 27.220 ms - 2822
GET /datatables/media/css/dataTables.bootstrap.min.css 404 45.252 ms - 2822
GET /pnotify/pnotify.core.css 404 69.666 ms - 2822
GET /jquery/dist/jquery.min.js 404 93.424 ms - 2822
GET /jqueryui/jquery-ui.min.js 404 41.507 ms - 2822
GET /bootstrap/dist/js/bootstrap.min.js 404 67.104 ms - 2822

I also noticed a crash when clicking on the localhost entry.

server_id: [1]
1
db.get [object Object]
db.list [{"id":1,"name":"localhost","url":"https://localhost:8053","password":"changeme","pdns_type":null,"pdns_id":null,"pdns_url":null,"pdns_daemon_type":null,"pdns_version":null,"pdns_config_url":null,"pdns_zones_url":null}]
undefined:1
undefined
^

SyntaxError: Unexpected token u
    at Object.parse (native)
    at /home/timo/Github/yapdnsui/routes/servers.js:61:23
    at Request._callback (/home/timo/Github/yapdnsui/libs/pdns/config.js:14:25)
    at self.callback (/home/timo/Github/yapdnsui/node_modules/request/request.js:198:22)
    at emitOne (events.js:90:13)
    at Request.emit (events.js:182:7)
    at Request.onRequestError (/home/timo/Github/yapdnsui/node_modules/request/request.js:877:8)
    at emitOne (events.js:90:13)
    at ClientRequest.emit (events.js:182:7)
    at TLSSocket.socketErrorListener (_http_client.js:295:9)

What dependencies am I missing?

PowerDNS v4 API compatibility

As far as I can see yapdnsui is not updated to the new API of PowerDNS version 4.
Are there any plans to make yapdnsui to work with the new API?

Under "manage servers", clicking a server causes yapdnsui to crash.

Clicking on a link in the "manage servers" section causes yapdnsui to crash.

Arch: amd64
OS: Ubuntu Vivid (15.04)
Node: v0.12.7
Bower: 1.5.2
yapdnsui version: Commit 089e762
Launch command: HOST=0.0.0.0 PORT=8080 DEBUG=yapdnsui node bin/www

Full output from launch to error:
yapdnsui Express server listening on port 8080 +0ms
db.list [{"id":1,"name":"192.168.103.104:8053","url":"http://192.168.103.104:8053","password":"changeme","pdns_type":null,"pdns_id":null,"pdns_url":null,"pdns_daemon_type":null,"pdns_version":null,"pdns_config_url":null,"pdns_zones_url":null}]
GET / 304 675.712 ms - -
GET /stylesheets/gh-fork-ribbon.css 304 3.334 ms - -
GET /bootstrap/dist/css/bootstrap.min.css 304 15.493 ms - -
GET /bootstrap/dist/css/bootstrap-theme.min.css 304 11.087 ms - -
GET /font-awesome/css/font-awesome.min.css 304 9.122 ms - -
GET /datatables/media/css/dataTables.bootstrap.min.css 304 8.121 ms - -
GET /pnotify/pnotify.core.css 304 7.566 ms - -
GET /stylesheets/style.css 304 0.299 ms - -
GET /jquery/dist/jquery.min.js 304 1.656 ms - -
GET /jqueryui/jquery-ui.min.js 304 1.679 ms - -
GET /bootstrap/dist/js/bootstrap.min.js 304 1.463 ms - -
db.list [{"id":1,"name":"192.168.103.104:8053","url":"http://192.168.103.104:8053","password":"changeme","pdns_type":null,"pdns_id":null,"pdns_url":null,"pdns_daemon_type":null,"pdns_version":null,"pdns_config_url":null,"pdns_zones_url":null}]
GET /servers 304 286.900 ms - -
GET /stylesheets/gh-fork-ribbon.css 304 0.964 ms - -
GET /bootstrap/dist/css/bootstrap.min.css 304 10.355 ms - -
GET /bootstrap/dist/css/bootstrap-theme.min.css 304 10.409 ms - -
GET /font-awesome/css/font-awesome.min.css 304 10.751 ms - -
GET /datatables/media/css/dataTables.bootstrap.min.css 304 4.977 ms - -
GET /pnotify/pnotify.core.css 304 4.841 ms - -
GET /stylesheets/style.css 304 2.786 ms - -
GET /jquery/dist/jquery.min.js 304 4.108 ms - -
GET /jqueryui/jquery-ui.min.js 304 4.235 ms - -
GET /bootstrap/dist/js/bootstrap.min.js 304 4.833 ms - -
GET /datatables/media/js/jquery.dataTables.min.js 304 5.258 ms - -
GET /datatables/media/js/dataTables.bootstrap.min.js 304 4.217 ms - -
GET /pnotify/pnotify.core.js 304 1.080 ms - -
GET /bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 304 1.011 ms - -
server_id: [1]
1
db.get [object Object]
db.list [{"id":1,"name":"192.168.103.104:8053","url":"http://192.168.103.104:8053","password":"changeme","pdns_type":null,"pdns_id":null,"pdns_url":null,"pdns_daemon_type":null,"pdns_version":null,"pdns_config_url":null,"pdns_zones_url":null}]
undefined:1
undefined
^
SyntaxError: Unexpected token u
at Object.parse (native)
at /usr/src/yapdnsui/routes/servers.js:61:23
at Request._callback (/usr/src/yapdnsui/libs/pdns/config.js:14:25)
at self.callback (/usr/src/yapdnsui/node_modules/request/request.js:198:22)
at Request.emit (events.js:107:17)
at Request.onRequestError (/usr/src/yapdnsui/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:271:9)
at Socket.emit (events.js:107:17)
at net.js:459:14

Docker build fails because in 2016 ubuntu:latest is no more what you meant

Docker build fails:

# docker build --rm=true --no-cache=true -t xbgmsharp/yapdnsui github.com/xbgmsharp/yapdnsui.git

...
Step 15 : RUN npm install -g bower grunt-cli npm-check-updates
 ---> Running in c00b25b44e43
/bin/sh: 1: npm: not found
The command '/bin/sh -c npm install -g bower grunt-cli npm-check-updates' returned a non-zero code: 127

FROM ubuntu:latest should be replaced with a specific tag (apparently it's ubuntu:14.04).

Does not work with PowerDNS 3.4.1 and NodeJS 0.10.40

Hello.

Installed, as described in https://github.com/xbgmsharp/yapdnsui
I can (and added) server to UI, But, when i trying to select server, i got an error in console:

SyntaxError: Unexpected token U
at Object.parse (native)
at /home/vlad/yapdnsui/routes/pdns.js:66:57
at Request._callback (/home/vlad/yapdnsui/libs/pdnsapi.js:15:25)
at Request.self.callback (/home/vlad/yapdnsui/node_modules/request/request.js:121:22)
at Request.emit (events.js:98:17)
at Request. (/home/vlad/yapdnsui/node_modules/request/request.js:985:14)
at Request.emit (events.js:117:20)
at IncomingMessage. (/home/vlad/yapdnsui/node_modules/request/request.js:936:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16

npm ERR! [email protected] start: DEBUG=yapdnsui node ./bin/www
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the yapdnsui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! DEBUG=yapdnsui node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls yapdnsui
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-358.23.2.el6.i686
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /home/vlad/yapdnsui
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/vlad/yapdnsui/npm-debug.log
npm ERR! not ok code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.