PUQ Mautic Skip to main content

5. Synchronization of DNS records

 Order now | Dowload | FAQ

Starting with version 1.4, the module started supporting DNS Synchronization
(cloudflare.com, HestiaCP)

In order to manage DNS zones to synchronization , you need to install the PUQ Customization addon module (free)

https://doc.puq.info/books/puq-customization-whmcs-addon/page/dns-zones
https://doc.puq.info/books/puq-customization-whmcs-addon/chapter/module-puqproxmoxkvm
https://doc.puq.info/books/puq-customization-whmcs-addon

https://download.puqcloud.com/WHMCS/addons/PUQ-Customization/


For your convenience, we have prepared a mechanism that generates basic domain entries for newly created servers.

Setting these entries is not necessary for the correct operation and use of the service.

In this version of the module, we do not have integration of procedures and mechanisms for synchronizing DNS records with various DNS servers. The module returns all IP addresses and DNS records as json using an http request. You need to do the integration with your DNS server yourself.

We want to introduce automatic integration of DNS records into popular services and DNS servers. But we don't know where to start. You can help us with this. Please visit our forum and post your needs. We will definitely try to implement them in future versions.
https://faq.puqcloud.com/

How it works

In order to get all IP addresses and DNS records, you need to send a GET request.

https://<WHMCS-SERVER>/modules/servers/puqProxmoxKVM/lib/dns/dns.php

Answer:

[
   {
      "forward" : "vlan-1-4779.vps.uuq.pl",
      "ip" : "192.168.0.2",
      "reverse" : "mail.uuq.pl"
   },
   {
      "forward" : "vps-1-4780.vps.uuq.pl",
      "ip" : "192.168.0.3",
      "reverse" : "test.vps.uuq.pl"
   },
   {
      "forward" : "vlan-1-4781.vps.uuq.pl",
      "ip" : "192.168.0.4",
      "reverse" : "blabla.vps.uuq.pl"
   }
]

The script does not return entries that contain errors or are empty.

With this information, you can import DNS records into your DNS server.

Security

For unauthorized access in the directory with the dns.php file, there is a .htaccess file in which you can allow access to specific IPs.

.htaccess file example
order deny,allow
deny from all
allow from <allowed_IP_address>