Giter Club home page Giter Club logo

poweradmin's Introduction

Poweradmin Composer

Poweradmin is a friendly web-based DNS administration tool for PowerDNS server. The interface has full support for most of the features of PowerDNS. It has full support for all zone types ( master, native and slave), for supermasters for automatic provisioning of slave zones, full support for IPv6 and comes with multi-language support.

Disclaimer

This project is not affiliated with PowerDNS.com , Open-Xchange, or any other third parties. It is independently funded and maintained. If this project does not meet your needs, please check out these other options.

Requirements

  • PHP 8.1
  • PHP intl extension
  • PHP gettext extension
  • PHP openssl extension
  • PHP filter extension
  • PHP tokenizer extension
  • PHP pdo extension
  • PHP pdo-mysql, pdo-pgsql or pdo-sqlite extension
  • PHP ldap extension (optional)
  • MySQL 5.7.x/8.x, MariaDB, PostgreSQL or SQLite database
  • PowerDNS authoritative server 4.0.0+

Tested on

Poweradmin PHP PowerDNS MariaDB MySQL PostgreSQL SQLite
3.8.x 8.1.28 4.5.5 10.11.8 - 16.3 3.45.3
3.7.x 8.1.2 4.5.3 11.1.2 8.2.0 16.0 3.40.1
3.6.x 8.1.2 4.5.3 11.1.2 8.1.0 16.0 3.40.1
3.5.x 8.1.17 4.5.3 10.11.2 8.0.32 15.2 3.34.1
3.4.x 7.4.3 / 8.1.12 4.2.1 10.10.2 8.0.31 15.1 3.34.1

Installation

Install the following dependencies:

On Debian based Systems:

apt install php-intl

For MySQL/MariaDB
apt install php-mysqlnd

For PostgreSQL
apt install php-pgsql

For SQLite
apt install php-sqlite3

On RHEL based Systems:

yum install -y php-intl

For MySQL/MariaDB
yum install -y php-mysqlnd

For PostgreSQL
yum install -y php-pgsql

Download the project files

  • Via Git:
    • Clone the repository: git clone https://github.com/poweradmin/poweradmin.git
    • Select latest tag (for example v3.7.0) or skip this if you want to run from master: git checkout tags/v3.7.0
  • Via releases:

Go to the installed system in your browser

  • Visit http(s)://URL/install/ and follow the installation steps
  • Once the installation is complete, remove the install folder
  • Point your browser to: http(s)://URL
  • Log in using the credentials created during setup

Troubleshooting

Whenever you experience a blank page or other weird behavior, check your http server logs for PHP errors. Alternatively, you can add a code block with error output to the browser (for instance, index.php if it fails):

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

Screenshots

Log in

The login screen

Zone list

List of zones

poweradmin's People

Contributors

alexjfisher avatar basemax avatar bnchdan avatar bribroder avatar bynicolas avatar chrostek avatar designet-oss avatar edmondas avatar foaly42 avatar internetjanitor avatar j4hu avatar jeroenbo avatar jsoref avatar karamelichkin avatar leeporte avatar lhost avatar lifeofguenter avatar mark-wagner avatar mgob avatar nkukard avatar ntx avatar pbeernink avatar rejozenger avatar ryanpetris avatar sebtm avatar sg5 avatar stasic avatar stbuehler avatar suhancz avatar tswestendorp 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poweradmin's Issues

Error adding Zones with Template

I tested version 2.1.6 from the git with postgresql 9.1.

If i add a zone with a template i get this error:

Error: doQuery: [Error message: Could not execute statement] [Last executed query: SELECT substring((SELECT substring(pg_get_expr(d.adbin, d.adrelid) for 128) FROM pg_attrdef d WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef ) FROM 'nextval[^\']'([^\'])') FROM pg_attribute a LEFT JOIN pg_class c ON c.oid = a.attrelid LEFT JOIN pg_attrdef d ON d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef WHERE (c.relname = 'domains_id' OR (c.relname = 'domains' AND a.attname = 'id') ) AND NOT a.attisdropped AND a.attnum > 0 AND pg_get_expr(d.adbin, d.adrelid) LIKE 'nextval%' ORDER BY a.attnum] [Native message: FEHLER: Syntaxfehler bei »]« LINE 6: ) FROM 'nextval[^\']'([^\']_)') ^]

Same error with 2.1.5 and postgres 9.1.

Per-User Record-Rights as in PowerAdmin v1.0

Hello,

it's a really big problem to us, because we are an isp in austria. So whats the problem? Our customers need to edit their subdomains and IPv4-PTR-Records without our help or anything else. In PowerAdmin v1.0 there was the opportunity to give a user only rights to some records in a zone. Why i cant do this in 2.1.6? Is there a workaround to do this as in the old version? Thank you very much and sorry for my bad english (austria, u knw?).

Different management for template zones with linked domains

When a template zone has one or more linked domains, it should not permitted to save template without changing also linked domains.

When a template domain has one or more linked zones, it should be only permitted to:

  • list linked domains (in the bottom part of the form)
  • unlink one or more domains
  • save template and change all linked zones

When a template domain has no linked zones, it should only be permitted to save it.

A template could always be cloned, despite of links.

Search.php zone owner

Owner col should be visible only if $perm_adit = "own", not ALL.

should be:

/* If user has all edit permissions show zone owners */
if ( $perm_edit == "own"){
echo "<th><a href=\"javascript:zone_sort_by('owner')\">" . _('Owner') . "</a></th>\n";
}

AND:

if ( $perm_edit == "own" ) {
echo "<td>" . $zone['owner'] . "</td>";
}

Insert form (in zone page) allows the user to enter trailing dots in the name field

I recently encountered a problem when I tried to use dig AXFR query on one of our zones.
After a fair amount time I found that one of our TXT records contained a pair of trailing dots
in the name fields. After correcting this the AXFR started to work.

While I still looking into how exactly the bad name was entered into the zone.
I did find that it was possible to add a name contain two trailing dots using the insert form
contained w/in the zone page of poweradmin. I did find that you can not edit an
existing record to contain trailing dots

I would ask that you consider adding some processing to the insert form that flags or corrects this condition
t

Thanks,
James

P.S We are using poweradmin v2.1.4 on a CentOS 6.2, and powerdns is v 2.9.22.6-1

Implement migration of encrypted password between different algorithms

Currently Poweradmin can encrypt user passwords using MD5 or MD5SALT algorithms. Encryption mode is defined in configuration file, but there is no way for users how to migrate from one mode to another. Implement interface which will allow to user to migrate their password to different encryption mode. It can be somehow controlled from config.inc.php (allow users to update passwords).

Unexpected behaviour with zone_meta_edit_own permission

Two unexpected behaviours here;

  • User cannot change a native domain and set it up as a slave domain, perhaps this should be possible? If I also add zone_slave_add, then the user can set a pre-existing domain as slave, but then the user also can create new slave zones, this is not desireable. I am trying to create a poweruser template that let users mostly freely edit their own zones, including changing it to slave from their own master server.
  • In addition, users are allowed to add additional owners to their zone when meta_edit_own is set, this makes little sense to me unless user also has some privilege that lets them manipulate users. Reason beeing that user can add themselves or remove themselves from the zone metadata, but nothing much else. They are infact allowed to remove themselves and thus "orphaning" the zone.
  • Further it seems that they can change the template of the zone, however as they are unable to create or maintain templates this ability also seems unreasonable without additional privileges.

Please consider changing the behaviour. Thanks,
Rune

Content fields corrupt with double quotes (")

TXT records don't seem to be edited or saved correctly with double-quotes ". This is a problem with SPF records imported as TXT from bind. A TXT field in the database with content like this:

"spf2.0/pra,mfrom +ip4:1.2.3.0/24 +ip4:4.5.6.0/24 ?all"

Will be displayed in PowerDNS "edit" with backslashes, although sometimes the ending double-quote will be missing.

"spf2.0/pra,mfrom +ip4:1.2.3.0/24 +ip4:4.5.6.0/24 ?all"

Saving this causes duplicate backslashes to appear the next time it's edited:

\"spf2.0/pra,mfrom +ip4:1.2.3.0/24 +ip4:4.5.6.0/24 ?all\"

And worse, a query to PowerDNS returns embedded 's:

example.org. 3600 IN TXT ""spf2.0/pra,mfrom +ip4:1.2.3.0/24 +ip4:4.5.6.0/24 ?all""

Test environment:
Safari 6.0.2 OSX 10.8.2
PowerDNS 3.1 mysql backend
PowerAdmin 2.1.6
Php 5.3.20

Ownership of supermaster DNS zones not set

When I've defined a supermaster (ip address, local name and user) all zone transfer stuff works fine, except that the received zone's owner is not set. When I edit the received zone I'm slave for, I can set the ownership manually, but would expect this to go automatically since I've already set the "user" when defining the supermaster. Is this a bug or feature request, not clear to me. I'm running version 2.1.6.

Regards,

Leon

BTW: Great product!!!!

dynamic_update.php broken when using PDO

The myql_real_escape_string needs a classic mysql connection.

Warning: mysql_real_escape_string(): Access denied for user ''@'localhost' (using password: NO) in /var/www-ssl/padmin/dynamic_update.php on line 32 Warning: mysql_real_escape_string(): A link to the server could not be established in /var/www-ssl/padmin/dynamic_update.php on line 32

Sort by #records broken

Doing a "List zones," zones are not sortable by number of records, although the column heading is a hyperlink promising to do just that. It's not all that desirable a feature for us, but probably should not be hyperlinked if not actually sorting.

Duplicate list_permission_templates code

There are 2 copies of list_permission_templates in users.inc.php -- list_permission_templates and get_list_permission_templates. It looks like a small code cleanup task.

Allow non-RFC TLDs

We're setting up internal root nameservers so we can use our own TLDs -- like "internal," "vlanXXX," etc. Just tried to add a domain called "hostname.test." It was rejected. Would it be possible to add support for internal-only domains?

CNAME Problem during zone-transfer

As Described in http://rfc-ref.org/RFC-TEXTS/1912/chapter2.html#sub4 CNAMEs should not coexists with other Records.

Poweradmin ignores this rule while saving new or modified records.

New Versions of ISC-Bind (used as public Slave Servers) reject this zones with "failed while receiving responses: CNAME and other data". A lot of Records are ignored until a new zone without this error will be transfered.

It would be a nice feature, if poweradmin would reject this zonemodifications.

Permissions Check issue in record.inc.php

Reported by: ryanpq

I am fairly certain I am working with the latest release. I have been developing a custom system based on PowerAdmin and have found and fixed what I believe is a bug and wanted to pass it along to the project.

In inc/record.inc.php line 286 The line currently reads as

if ( $perm_content_edit == "all" || ($perm_content_edit == "own" && $user_is_zone_owner == "0" )) {

This function checks that a user is either an admin or is the owner of the zone and has permissions to edit their own zones. Currently the check allows editing if they have edit permissions and are NOT the owner of the zone. Unless I am mistaken the line should read:

if ( $perm_content_edit == "all" || ($perm_content_edit == "own" && $user_is_zone_owner == "1" )) {

Note: It appears that the ticket system removes the "or" bars in these lines so they wont read exactly as they do in the codebase.

Delete PTR record along with A record

When deleting an A record that has a corresponding PTR record, the PTR record remains after the A record has been deleted, so you have to go in manually and remove the PTR record. Could this be changed so that in effect, PTR records never have to be touched manually?

Private TLDs

Hi,

I'm trying to create custom private TLDs for my internal network (eg: .cdz ) with Poweradmin. Unfortunately, Poweradmin doesn't allow me to create/modify zones that contain only the TLD has the zone name. Event if the "dns_strict_tld_check" parameter has been set to false. For example, I can create a master zone "test.cdz" but not "cdz".

I've checked the code, and the problem seems to come from the function "is_valid_hostname_fqdn" in the dns.php file. The function tests if the value of "hostname_labels" variable is 1, which is the case with my private TLDs.

...
if ($label_count == 1) {
return false;
}
...

I've removed the last test from the function and I able the create/modify zones that contains only the TLD has the zone name. But I think it would be better to have a setting in the configuration file for this.

Regards

Yanick

LIMIT syntax in inc/records.inc.php

postgresql backend on poweradmin chokes on this:

(line 1107)

$db->setLimit($rowamount, $rowstart);

i've set it to:

$db->setLimit($rowamount . ' OFFSET ' . $rowstart);

which is supported by both mysql (since 4.0.6) and postgres.

SQL error creating a zone with Pg and PDO

After successfully creating a zone template, I tried to add a test zone and got the following error:

The following query generated an error:

INSERT INTO zones (domain_id,
 owner,
 zone_templ_id) VALUES ('',
 '1',
 '1')

SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: ""
LINE 1: ...O zones (domain_id, owner, zone_templ_id) VALUES ('', '1', '...
                                                             ^

[URGENT] Update zone template flushes all zones where template is used

When you perform some changes in a template and you press the button "Update zones", all zones where this template is used are flushed. I just lost all my records!!! I had to restore a backup to have them back.
This behaviour is wrong, since all records should be preserved. I am using PowerAdmin v2.1.6

Unable to add PTR record for root of domain

Given a root domain of domainname.tld, we usually create an A record:

domainname.tld. IN A <IP_ADDR>

When creating this record for a domain and checking "Add also reverse record," the forward record is created, but the reverse record isn't.

[URGENT] Update zone template flushes all zones where template is used

When you perform some changes in a template and you press the button "Update zones", all zones where this template is used are flushed. I just lost all my records!!! I had to restore a backup to have them back.
This behaviour is wrong, since all records should be preserved. I am using PowerAdmin v2.1.6

2.1.6 PTR records edting is broken

HI

since 2.1.6 i am not able to add new PTR records or edit existing records. Error:

Error: Zone has not been updated successfully.

Thanks
Ognjen

reset of SOA serial after changes in template

I think that there's a strange behavior, I don't know if it's a bug: when you modify the template and then update zones, the SOA serial is reset to the first one (YYYYMMDD00) even if it was modified before (ie: was YYYYMMDD02). Is this correct?

I'm watching update_zone_records in inc/record.inc.php, maybe the solution should be getting the SOA of current zone and update it instead of recreate it

ok: the reset issue seems related to inc/toolkit.inc.php, function parse_template_value, it bring back to 00 the SOA..

so, maybe replacing parse_template_value with update_soa_records if $rtype? is == 'SOA' should work...

I tried to modify the update_zone_records (and update_soa_records) in order to increment the serial instead reset it: http://pastebin.com/tCmKLKJk (I'm not sure that it works fine, because I hadn't so much time to read the entire code!)

List zones beginning with underscore

Just noticed that I had to use the search feature or "Show all" to see zones beginning with an underscore (e.g. _tcp.domain.tld). They aren't visible via the alphabetical links. Not a huge bug, just a small inconvenience.

[URGENT] Update zone template flushes all zones where template is used

When you perform some changes in a template and you press the button "Update zones", all zones where this template is used are flushed. I just lost all my records!!! I had to restore a backup to have them back.
This behaviour is wrong, since all records should be preserved. I am using PowerAdmin v2.1.6

CNAMEs in the top level of a DNS zone

Having a CNAME in the apex of a DNS zone is not valid configuration. PowerAdmin currently allows them to be created. Caused me a few hours of hunting/debugging this evening to find that one out!

add support for usergroups

Reported by: rejo Owned by:
Priority: major Milestone: Later
Component: interface Version: 2.1.3

Add usergroup support. Afterwards, a zone or record can be owner by a usergroup, which consists of one or more users.

Implement user activity logging

There could be three different options:

  1. Use existing syslog functionality and log user activity
  2. Implement activity logging to some external file
  3. Store user activity in the database

Prepopulate "Add record to zone template" fields

For zone templates, since they most often contain SOA records, NS records, and MX records--stuff where the left side of the record is implied, why not prepopulate the "Name" field with [ZONE] and the "TTL" field with whatever the system's default is? This'll save some typing, and will remind people what they've set their default TTL to.

Display proper message when wrong authentication mode is used

Currently Poweradmin can encrypt user passwords using MD5 or MD5SALT algorithms. Encryption mode is defined in configuration file, but there is no way for users how to migrate from one mode to another. Right now just add some informative message instead of authentication failed. Implementation of Migration is set to other milestone (separate task).

Proper errorhanding of "also add reverse" for nonexistent reverse zone

Hi,

Adding an entry and also check add reverse checkbox for an IP address whos in-addr zone is not handled by poweradmin results in the following error message(s):

Error: Invalid argument(s) given to function %s
Error: Invalid argument(s) given to function get_record_from_id
Error: Invalid argument(s) given to function get_zone_name_from_id Not a valid domainid:
The PTR-record was successfully added.
The record was successfully added.

Id suggest handling this rather than trying to add to a nonexistent zone, also I would suggest considering disabling the add reverse using an ajax call to verify that the zone is available and/or that the user has the proper rights to add an entry to the relevant in-addr zone.

Whatever you decide is your call - but Id suggest better handling this exception than dumping that set of messages on the end user :-)

Best,
Rune

PHP notice after deletion of user

After you remove user, Poweradmin will show:

Notice: Undefined index: zone in /Users/eg/Projects/poweradmin/delete_user.php on line 42
The user has been deleted successfully.

List zones sort order

When sorting domains by type (master/native/slave), there should be a secondary sort by name so zones are easily visible. Currently have to use the browser search to find the zone I'm looking for.

Two different messages when deleting user template

If you will try to delete user template which is used for some user then you will get two different messages:

Error: This template is assigned to at least one user.
The permission template has been deleted successfully.

Change username error already exist

in SVN trunk there is a small bug in function for changing username of user:

file "inc/users.inc.php" line 302
$query = "SELECT id FROM users WHERE username = " . $db->quote($user, 'integer');

i juste replace integer to text:

$query = "SELECT id FROM users WHERE username = " . $db->quote($user, 'text');

then function work.

All text boxes are reset if there is mistake in entered data.

(Eg. Create new user without FQDN email id, click on commit changes, all entered data will reset with error message on top)

When adding new user, zone etc. If error is encountered during validation when committed (submit) all entered data is reset form is reloaded, user has to enter all data again. instead is should show red border / highlight the box which needs correction, Not reset all data.

Results repeated in "list zones" pagination

We run a /16 network, so we manage several hundred reverse zones. On the third page of pagination, the results from the second page are repeated, followed by a new set of results.

Template records accept empty content field

Hello,

I'm testing out PowerAdmin 2.1.6 and ran into the following problem: when adding a record to a zone template, the form accepts a blank content field. There probably should be some sort of error message here.

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.