PDNS Manager on Debian 9

16 Feb

Start with basic install of Debian (I used 9.9.X) – no packages and simply replace “password” with your mysql password, and nsX.domain.tld with your actual domain name (name server).

Install OpenSSH Server:

apt-get install openssh-server

Allow root to SSH into machine:

nano /etc/ssh/sshd_config
allow root logins = yes

If using Proxmox let’s install QEMU:

apt-get install qemu-guest-agent

If using ESXi:

apt-get install open-vm-tools

I like to install a few other tools:

apt-get install htop vnstat net-tools ntp locate apt-transport-https

If using ESXi:

echo blacklist i2c_piix4 >> /etc/modprobe.d/blacklist.conf
update-initramfs -u -k all

If using Proxmox we need another package:

apt-get install lsb-release
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php7.3.list

Let’s update our sources:

apt-get update

Now to install some web requirements:

apt-get install apache2 mariadb-server php7.3 php7.3-mysql php7.3 php7.3-json php-apcu

Configure the database:

mysql_secure_installation

Create the directory web access files will reside:

mkdir -p /var/vhosts/nsX.domain.tld/

Let’s download the latest release:

cd /tmp
wget https://dl.pdnsmanager.org/pdnsmanager-2.0.1.tar.gz
tar xzf pdnsmanager-2.0.1.tar.gz
cd pdnsmanager-2.0.1
cp -R * /var/vhosts/nsX.domain.tld/

Create an Apache configuration file:

nano /etc/apache2/sites-available/nsX.domain.tld.conf
<VirtualHost 0.0.0.0:80>
ServerAdmin email@emailaddress.com
ServerName nsX.domain.tld
DocumentRoot "/var/vhosts/nsX.domain.tld/frontend"
Require all granted
RewriteEngine On
RewriteRule ^index.html$ - [L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule !^/api/.* /index.html [L]
Alias /api /var/vhosts/nsX.domain.tld/backend/public
<Directory /var/vhosts/nsX.domain.tld/backend/public>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

Assign ownership:

chown -R www-data:www-data /var/vhosts

Enable the required Apache modules:

a2enmod rewrite

Enable the configuration and start restart Apache:

a2ensite nxX.domain.tld
service apache2 restart

Now we need to create a database:

mysql -u root -p
CREATE DATABASE pdns;
GRANT ALL PRIVILEGES ON pdns.* To 'pdns'@'%' IDENTIFIED BY 'password';
quit;

Complete the setup via a browser:

http://ip-address/setup

Install the DNS server:

apt-get install pdns-server pdns-backend-mysql
select >>> NO

Copy the configuration file:

cp /etc/powerdns/pdns.conf /etc/powerdns/pdns.conf.original

Remove the configuration file:

rm /etc/powerdns/pdns.conf

Create a new configuration file:

nano /etc/powerdns/pdns.conf
allow-axfr-ips=
allow-recursion=127.0.0.1
config-dir=/etc/powerdns
daemon=yes
disable-axfr=no
guardian=yes
local-address=0.0.0.0
local-port=53
master=yes
slave=yes
module-dir=/usr/lib/x86_64-linux-gnu/pdns
setgid=pdns
setuid=pdns
socket-dir=/var/run
version-string=powerdns
include-dir=/etc/powerdns/pdns.d

Make a copy of the configuration file:

cp /etc/powerdns/pdns.d/bind.conf /etc/powerdns/pdns.d/bind.conf.original
rm /etc/powerdns/pdns.d/bind.conf

Make a copy of the configuration file:

cp /etc/powerdns/pdns.d/pdns.local.gmysql.conf /etc/powerdns/pdns.d/pdns.local.gmysql.original
rm /etc/powerdns/pdns.d/pdns.local.gmysql.conf
nano /etc/powerdns/pdns.d/pdns.local.gmysql.conf
launch=gmysql
gmysql-host=localhost
gmysql-port=3306
gmysql-dbname=pdns
gmysql-user=pdns
gmysql-password=password
gmysql-dnssec=no

Let’s restart the service:

service pdns restart

Finally, doublecheck the hostname is correct:

hostnamectl set-hostname nsX.domain.tld

PDNS Manager has very poor error parsing / checking. It will allow you to create records with spaces and other non-standard characters. It’s always best to run pdnsutil to check all zones via the console:

pdnsutil check-all-zones -v

62 thoughts on “PDNS Manager on Debian 9

  1. I’ll right away snatch your rss feed as I can not in finding your e-mail subscription link or newsletter service. Do you’ve any? Kindly let me recognise so that I may just subscribe. Thanks.

  2. I like what you guys are usually up too. This kind of clever work and exposure! Keep up the fantastic works guys I’ve incorporated you guys to my blogroll.

  3. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how can we communicate?

  4. Hi would you mind letting me know which web host you’re utilizing? I’ve loaded your blog in 3 different internet browsers and I must say this blog loads a lot faster then most. Can you suggest a good internet hosting provider at a honest price? Many thanks, I appreciate it!

  5. Hi would you mind letting me know which hosting company you’re using? I’ve loaded your blog in 3 different browsers and I must say this blog loads a lot faster then most. Can you recommend a good web hosting provider at a fair price? Kudos, I appreciate it!

  6. Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate?

  7. My partner and I stumbled over here coming from a different page and thought I should check things out.
    I like what I see so now i am following you. Look forward to looking over your web page again.
    https://bet-4-br.com

  8. After looking into a few of the blog articles on your site, I really like your
    technique of blogging. I bookmarked it to my bookmark site list and
    will be checking back in the near future. Please visit my web
    site as well and tell me how you feel.
    https://bet61-88.com

  9. Hi there, just became aware of your blog through
    Google, and found that it’s truly informative. I’m gonna watch out for brussels.

    I’ll be grateful if you continue this in future. A lot
    of people will be benefited from your writing.
    Cheers!
    https://ggbet-88.com

  10. Hey would you mind letting me know which web host you’re using? I’ve loaded your blog in 3 different web browsers and I must say this blog loads a lot faster then most. Can you recommend a good web hosting provider at a fair price? Thank you, I appreciate it!

  11. Appreciating the dedication you put into your site and detailed information you present.

    It’s good to come across a blog every once in a while that isn’t the same outdated rehashed material.
    Great read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

    https://7755-bet.com

  12. I was curious if you ever considered changing the structure of your blog?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content
    so people could connect with it better. Youve got an awful lot of text for only having 1 or two images.

    Maybe you could space it out better?
    pk55

  13. Good day I am so delighted I found your web site, I really found you by accident, while I was researching on Google for something else, Anyhow I am here now and
    would just like to say cheers for a tremendous post and a all round
    enjoyable blog (I also love the theme/design), I don’t have time to read through it
    all at the moment but I have saved it and also added in your RSS feeds, so when I have
    time I will be back to read a lot more, Please do keep up the superb b.

    bet7

  14. I know this if off topic but I’m looking into starting my own weblog and was curious what all is
    required to get set up? I’m assuming having a blog
    like yours would cost a pretty penny? I’m not very internet smart so I’m not 100% positive.
    Any tips or advice would be greatly appreciated. Thank you
    https://bet-7k.com

  15. I really like what you guys are up too. Such clever work and coverage! Keep up the great works guys I’ve incorporated you guys to blogroll.

  16. Hey just wanted to give you a quick heads up. The words in your article seem to be running off the screen in Safari. I’m not sure if this is a format issue or something to do with web browser compatibility but I figured I’d post to let you know. The style and design look great though! Hope you get the problem fixed soon. Kudos

  17. Hi there just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Opera. I’m not sure if this is a formatting issue or something to do with internet browser compatibility but I figured I’d post to let you know. The design look great though! Hope you get the problem fixed soon. Cheers

  18. I really like what you guys are usually up too. This kind of clever work and exposure! Keep up the very good works guys I’ve incorporated you guys to my blogroll.

  19. Hey! Someone in my Facebook group shared this website with us so I came to look it over. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Great blog and superb design and style.

  20. Hello! Someone in my Myspace group shared this site with us so I came to check it out. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers! Terrific blog and brilliant design.

  21. Howdy just wanted to give you a quick heads up. The text in your content seem to be running off the screen in Opera. I’m not sure if this is a format issue or something to do with web browser compatibility but I thought I’d post to let you know. The layout look great though! Hope you get the issue solved soon. Cheers

  22. Howdy just wanted to give you a quick heads up. The text in your content seem to be running off the screen in Opera. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I figured I’d post to let you know. The layout look great though! Hope you get the issue fixed soon. Kudos

  23. Need top-notch roof installation in Lancaster? Roof Installation Pros delivers professional services with a skilled team ready to handle all roof types. Their work is reliable, durable, and adds value to your home—trusted by many for timely and budget-friendly roofing solutions.

  24. Get reliable roof installation services in Lancaster with Roof Installation Pros. Whether it’s a new roof or a replacement, their experienced crew delivers quality craftsmanship that lasts. Known for fair pricing and dependable results that boost home value—your roof is in safe hands.

  25. When it comes to roof installation in Lancaster, Roof Installation Pros stands out for quality and reliability. Their expert team works with all roof types, delivering strong, protective installations that add value. Highly rated for affordable, on-time, and professional roofing work.

  26. For dependable and expert roof installation services in Lancaster, Roof Installation Pros is your go-to choice. They specialize in all roofing types, delivering lasting solutions that safeguard your property and boost its value. Count on them for affordable, high-quality, and on-time service.

  27. Searching for trusted roof installation in Lancaster? Roof Installation Pros provides expert services across all roofing styles. Their experienced team guarantees strong, lasting installations that enhance your home’s protection and market value. Excellent service, always on time and within budget.

  28. For dependable and expert roof installation services in Lancaster, Roof Installation Pros is your go-to choice. They specialize in all roofing types, delivering lasting solutions that safeguard your property and boost its value. Count on them for affordable, high-quality, and on-time service.

  29. Need top-notch roof installation in Lancaster? Roof Installation Pros delivers professional services with a skilled team ready to handle all roof types. Their work is reliable, durable, and adds value to your home—trusted by many for timely and budget-friendly roofing solutions.

  30. For dependable and expert roof installation services in Lancaster, Roof Installation Pros is your go-to choice. They specialize in all roofing types, delivering lasting solutions that safeguard your property and boost its value. Count on them for affordable, high-quality, and on-time service.

  31. Have you ever thought about adding a little bit more than just your articles? I mean, what you say is important and everything. But just imagine if you added some great images or video clips to give your posts more, “pop”! Your content is excellent but with pics and clips, this website could certainly be one of the very best in its field. Fantastic blog!

Leave a Reply

Your email address will not be published.