PUQ Mautic Skip to main content

DNS

Order now | Download | FAQ

DNS status

Request Structure: https://<puqvpnvp>/api/v1/dns

Method: GET

Cookie: access_hash=<access_hash>

Example:

curl \
-b "access_hash=eda121857897bcf0e4cdf5a3eaf957f35ccb62d39d5bc0bfbfb6d31644eee3cd7f8365e71ad94a60" \
-X GET https://dev.softkeel.com/api/v1/dns

Response example:

{
   "error" : "",
   "msg" : {
      "acl" : [
         "127.0.0.1",
         "10.0.110.0/24",
         "10.0.107.0/24",
         "10.0.176.0/24",
         "10.0.44.0/24",
         "10.0.68.0/24",
         "10.0.111.0/24",
         "10.0.15.0/24",
         "10.0.1.0/24",
         "10.0.52.0/24",
         "10.0.85.0/24"
      ],
      "bind9" : "1:9.16.33-1~deb11u1",
      "enabled" : true,
      "forwarders_1" : "77.87.125.10",
      "forwarders_2" : "77.87.125.20",
      "max_cache_ttl" : "3600",
      "pid" : "2649459"
   },
   "status" : "success"
}

Errors:

-The license is not active
-Not authorized

DNS EDIT

Request Structure: https://<puqvpnvp>/api/v1/dns

Cookie: access_hash=<access_hash>

Method: PUT

PUT data: 

Options not required:

"enabled"  = false|true
"forwarders_1" = "CIDR format"
"forwarders_2" = "CIDR format"
"max_cache_ttl" = "30-3600"

Example:

curl \
-b "access_hash=eda121857897bcf0e4cdf5a3eaf957f35ccb62d39d5bc0bfbfb6d31644eee3cd7f8365e71ad94a60" \
-d "enabled=false&\
forwarders_1=1.1.1.1&\
forwarders_2=8.8.8.8&\
max_cache_ttl=300" \
-X PUT https://dev.softkeel.com/api/v1/dns

Response example:

{
   "error" : "",
   "msg" : {
      "address" : "10.0.127.1/24",
      "b_download" : "6",
      "b_upload" : "7",
      "dns_1" : "8.8.8.8",
      "dns_2" : "1.1.1.1",
      "external_ip" : "77.87.125.200",
      "interface_name" : "wg128",
      "internal_traffic" : false,
      "listen_port" : "51333",
      "name" : "Default_128",
      "private_key" : "cAnS3fQbdvHUS+9eV05Uf+cP+gn8i4LpzXsdE7mUZ2E=",
      "public_key" : "RVNBbsEIjEkgsyXzmd5vMBIcOzzcTSC/fPscdDwzlQo="
   },
   "status" : "success"
}

Errors:

-Not authorized
-Incorrect data in Forwarder1 parameters
-Incorrect data in Forwarder2 parameters