User Tools

Site Tools


docker:docker-compose:powerdns

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docker:docker-compose:powerdns [2026/04/09 11:21] – created jonathandocker:docker-compose:powerdns [2026/04/09 11:37] (current) jonathan
Line 262: Line 262:
  
 </code> </code>
 +
 +
 +=== GUI/API ===
 +To access the GUI (http://192.168.22.8:8089/), you must use the admin username and the password defined in "pdns/pdns.conf".
 +
 +For API access, the API secret key is also defined in "pdns/pdns.conf".
 +
 +
 +<code>
 +jonathan@jonathan-VirtualBox:~/Downloads$ curl -H "X-API-Key: change_me_long_random_key"      http://192.168.22.8:8089/api/v1/servers | jq .
 +  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
 +                                 Dload  Upload   Total   Spent    Left  Speed
 +100   328  100   328    0      50719      0 --:--:-- --:--:-- --:--:-- 54666
 +[
 +  {
 +    "autoprimaries_url": "/api/v1/servers/localhost/autoprimaries{/autoprimary}",
 +    "config_url": "/api/v1/servers/localhost/config{/config_setting}",
 +    "daemon_type": "authoritative",
 +    "id": "localhost",
 +    "type": "Server",
 +    "url": "/api/v1/servers/localhost",
 +    "version": "4.9.13",
 +    "zones_url": "/api/v1/servers/localhost/zones{/zone}"
 +  }
 +]
 +
 +
 +
 +jonathan@jonathan-VirtualBox:~/Downloads$ curl -s \
 +  -H "X-API-Key: change_me_long_random_key" \
 +  http://192.168.22.8:8089/api/v1/servers/localhost/zones \
 +  | jq .
 +[
 +  {
 +    "account": "",
 +    "catalog": "",
 +    "dnssec": false,
 +    "edited_serial": 2,
 +    "id": "example.com.",
 +    "kind": "Native",
 +    "last_check": 0,
 +    "masters": [],
 +    "name": "example.com.",
 +    "notified_serial": 0,
 +    "serial": 2,
 +    "url": "/api/v1/servers/localhost/zones/example.com."
 +  }
 +]
 +
 +
 +
 +jonathan@jonathan-VirtualBox:~/Downloads$ curl -s \
 +  -H "X-API-Key: change_me_long_random_key" \
 +  http://192.168.22.8:8089/api/v1/servers/localhost/zones/example.com. \
 +  | jq .
 +{
 +  "account": "",
 +  "api_rectify": false,
 +  "catalog": "",
 +  "dnssec": false,
 +  "edited_serial": 2,
 +  "id": "example.com.",
 +  "kind": "Native",
 +  "last_check": 0,
 +  "master_tsig_key_ids": [],
 +  "masters": [],
 +  "name": "example.com.",
 +  "notified_serial": 0,
 +  "nsec3narrow": false,
 +  "nsec3param": "",
 +  "rrsets": [
 +    {
 +      "comments": [],
 +      "name": "www.example.com.",
 +      "records": [
 +        {
 +          "content": "192.168.10.51",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "A"
 +    },
 +    {
 +      "comments": [],
 +      "name": "mail.example.com.",
 +      "records": [
 +        {
 +          "content": "192.168.10.60",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "A"
 +    },
 +    {
 +      "comments": [],
 +      "name": "ns2.example.com.",
 +      "records": [
 +        {
 +          "content": "192.168.22.8",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "A"
 +    },
 +    {
 +      "comments": [],
 +      "name": "ns1.example.com.",
 +      "records": [
 +        {
 +          "content": "192.168.22.8",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "A"
 +    },
 +    {
 +      "comments": [],
 +      "name": "example.com.",
 +      "records": [
 +        {
 +          "content": "\"v=spf1 -all\"",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "TXT"
 +    },
 +    {
 +      "comments": [],
 +      "name": "example.com.",
 +      "records": [
 +        {
 +          "content": "10 mail.example.com.",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "MX"
 +    },
 +    {
 +      "comments": [],
 +      "name": "example.com.",
 +      "records": [
 +        {
 +          "content": "ns1.example.com. hostmaster.example.com. 2 10800 3600 604800 3600",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "SOA"
 +    },
 +    {
 +      "comments": [],
 +      "name": "example.com.",
 +      "records": [
 +        {
 +          "content": "ns1.example.com.",
 +          "disabled": false
 +        },
 +        {
 +          "content": "ns2.example.com.",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "NS"
 +    },
 +    {
 +      "comments": [],
 +      "name": "example.com.",
 +      "records": [
 +        {
 +          "content": "192.168.10.50",
 +          "disabled": false
 +        }
 +      ],
 +      "ttl": 3600,
 +      "type": "A"
 +    }
 +  ],
 +  "serial": 2,
 +  "slave_tsig_key_ids": [],
 +  "soa_edit": "",
 +  "soa_edit_api": "",
 +  "url": "/api/v1/servers/localhost/zones/example.com."
 +}
 +
 +
 +
 +
 +
 +jonathan@jonathan-VirtualBox:~/Downloads$ curl -s \
 +  -H "X-API-Key: change_me_long_random_key" \
 +  http://192.168.22.8:8089/api/v1/servers/localhost/zones/example.com. \
 +  | jq '.rrsets'
 +[
 +  {
 +    "comments": [],
 +    "name": "www.example.com.",
 +    "records": [
 +      {
 +        "content": "192.168.10.51",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "A"
 +  },
 +  {
 +    "comments": [],
 +    "name": "mail.example.com.",
 +    "records": [
 +      {
 +        "content": "192.168.10.60",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "A"
 +  },
 +  {
 +    "comments": [],
 +    "name": "ns2.example.com.",
 +    "records": [
 +      {
 +        "content": "192.168.22.8",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "A"
 +  },
 +  {
 +    "comments": [],
 +    "name": "ns1.example.com.",
 +    "records": [
 +      {
 +        "content": "192.168.22.8",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "A"
 +  },
 +  {
 +    "comments": [],
 +    "name": "example.com.",
 +    "records": [
 +      {
 +        "content": "\"v=spf1 -all\"",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "TXT"
 +  },
 +  {
 +    "comments": [],
 +    "name": "example.com.",
 +    "records": [
 +      {
 +        "content": "10 mail.example.com.",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "MX"
 +  },
 +  {
 +    "comments": [],
 +    "name": "example.com.",
 +    "records": [
 +      {
 +        "content": "ns1.example.com. hostmaster.example.com. 2 10800 3600 604800 3600",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "SOA"
 +  },
 +  {
 +    "comments": [],
 +    "name": "example.com.",
 +    "records": [
 +      {
 +        "content": "ns1.example.com.",
 +        "disabled": false
 +      },
 +      {
 +        "content": "ns2.example.com.",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "NS"
 +  },
 +  {
 +    "comments": [],
 +    "name": "example.com.",
 +    "records": [
 +      {
 +        "content": "192.168.10.50",
 +        "disabled": false
 +      }
 +    ],
 +    "ttl": 3600,
 +    "type": "A"
 +  }
 +]
 +</code>
 +
docker/docker-compose/powerdns.1775733665.txt.gz · Last modified: by jonathan