Integrating PowerDNS Authoritative Server with Micetro - Micetro - 26.1.0

Micetro Reference Articles

ft:locale
en-US
Product name
Micetro
Version
26.1.0

PowerDNS is integrated through the generic DNS service. The PowerDNS connector script facilitates zone management within PowerDNS. Both Native mode and Primary/Secondary mode are supported in the Authoritative PowerDNS.

Prerequisites

  • PowerDNS Authoritative DNS Server: Make sure you have PowerDNS installed and running.
  • Micetro Agent: Download the Micetro Agent installer package.

Enabling the PowerDNS REST API

  1. Edit your PowerDNS configuration file to enable the REST API:
    api=yes
    api-key=bluecat123
    webserver-port=8081
  2. Test the REST API with a curl command:
    curl -v -H 'X-API-Key: bluecat123' http://127.0.0.1:8081/api/v1/servers/localhost/zones | jq .

Configuration steps for mmremoted on Linux

  1. Install the Micetro Agent:
    1. Download and extract the Micetro Agent installer package.
    2. Run the installer as root:
      ./install --generic-dns-controller

      This starts the agent, listening on port 1337/TCP.

  2. Set up a Python environment:
    1. Install Python 3.12 (or >=3.10) and the required modules:
      pip install python-dotenv requests
  3. Download and configure the Python connector script:
    1. Download the Python connector script.
    2. Extract the zip file to get genericDNSPowerDNSP3.py and ingest_env_vars.py.
    3. Copy both files to /var/mmsuite/dns_server_controller.
  4. Edit the preferences configuration:
    1. Edit /var/mmsuite/dns_server_controller/preferences.cfg and add the XML tag:
      <GenericDNSScript value="/usr/bin/python3.12 /var/mmsuite/dns_server_controller/genericDNSPowerDNSP3.py" />
  5. Create and configure environment variables:
    1. Create an mmremote defaults file, for example, /etc/sysconfig/mmremote on RHEL, and add the necessary environment variables.
      BASE_URL="http://localhost:8081/"             # your PDNS REST API base URL
      SERVER="localhost"                            # the server instance name
      API_KEY="bluecat123"                          # the API secret configured in the PDNS config
      PDNS_DEFAULT_TTL="3600"                       # your DEFAULT TTL value
      LOG_LEVEL="INFO"                              # INFO or DEBUG are supported as log level
      LOG_FILE_NAME="/tmp/mmGenericDNSPowerDNS.log" # log file path
  6. Edit the mmremote service file:
    1. Locate and edit the mmremote.service file, for example, /usr/lib/systemd/system/mmremote.service on RHEL.
    2. Add the EnvironmentFile statement that points to the defaults file:
      [Unit]
      Description=Men & Mice DNS Server Controller
      After=syslog.target network.target
      
      [Service]
      Type=forking
      PIDFile=/var/run/mmremoted/mmremoted.pid
      Environment=USER=root
      Environment=GROUP=root
      Environment=DATA=/var/mmsuite/dns_server_controller
      Environment=PORT=1337
      Environment=LOGLEVEL=3
      EnvironmentFile=/etc/sysconfig/mmremote
      ExecStart=/usr/sbin/mmremoted -u ${USER} -g ${GROUP} -d${DATA} -ll${LOGLEVEL} -p ${PORT}
      KillMode=process
  7. Reload and restart the service:
    1. REload the systemd daemon and restart the mmremote service:
      systemctl daemon-reload
      systemctl restart mmremote
  8. Verify the setup:
    1. Check the /tmp/mmGenericDNSPowerDNS.log file for any issues.
    2. You can also enable debug mode for more detailed logs.