Articles in this section

How to setup PowerDNS and integrate it into SolusVM 2

Applicable to:

  • SolusVM 2

Question

How to set up PowerDNS and integrate it into SolusVM 2

Answer

Our documentation on the matter: Improving Deliverability of Users' Emails Using Reverse DNS

1. Deploy a PowerDNS installation using this guide: Master DNS Server Install 

2. Configure the PowerDNS API key by adding the following lines in the file /etc/pdns/pdns.conf:

api=yes
api-key=API_KEY
webserver-address=0.0.0.0
webserver-allow-from=SolusVM_Management_IP

Note: API_KEY is any API KEY. You can generate it here: https://codepen.io/corenominal/pen/rxOmMJ

3. Restart pdns service:

# service pdns restart

4. Browse to SolusVM 2 > Settings DNS and specify PowerDNS server settings:

  • Host - PowerDNS server IP address
  • API key - API key from step 2
  • Port - 8081

Note: For example, if it is needed to create hostnames according to the scheme in
SolusVM 2 > Settings > DNS  > Default hostname template for new servers -
let it be {{random-prefix}}.domain.tld or just want to create VPS with hostnames test1.domain.tld and test2.domain.tld - then add the zone domain.tld on PowerDNS manually:
# pdnsutil create-zone domain.tld

These steps are not needed because SolusVM 2 adds records automatically now, except for the main DNS zone.

5. Change the URL to https://SOLUSVM2_IP/ in the address bar and press Enter
6. Go to Account > API Tokens and generate a new token
7. Copy it and note somewhere in order not to lose it
8. Go back to the admin panel https://SOLUSVM2_IP/admin
9. Create a VPS. For example, example.com
10. Run the following API request using VPS ID, VPS hostname, and API Token. Let's assume the VPS has ID 169 and the hostname is example.com:


# curl --http1.1 -X PATCH "https://SolusVM2_IP/api/v1/servers/VM_ID" -H "accept: application/json" -H "authorization: Bearer API_TOKEN" -H "Content-Type: application/json" -H "X-CSRF-TOKEN: " -d "{\"name\":\"example.com\",\"description\":\"server description\",\"fqdns\":[\"test1.example.com\",\"test2.example.com\"],\"backup_settings\":{\"enabled\":true,\"schedule\":{\"type\":\"monthly\",\"time\":{\"hour\":0,\"minutes\":0},\"days\":[1]}}}"

Note: In this particular case DNS zone example.com must be created on the PowerDNS server.
In this request, make sure to replace the proper information according to your environment.
test1.example.com and test2.example.com are the A records that will be added to PowerDNS.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.