Различия
Показаны различия между двумя версиями страницы.
Следующая версия | Предыдущая версия | ||
system:powerdns [2015/09/15 10:02] – внешнее изменение 127.0.0.1 | system:powerdns [2025/09/06 03:43] (текущий) – mirocow | ||
---|---|---|---|
Строка 1: | Строка 1: | ||
- | {{tag> | + | {{tag>networks networking |
====== Power DNS ====== | ====== Power DNS ====== | ||
Строка 13: | Строка 13: | ||
====== Обновление ====== | ====== Обновление ====== | ||
+ | |||
+ | ====== Docker ====== | ||
+ | |||
+ | <code yaml> | ||
+ | version: ' | ||
+ | |||
+ | services: | ||
+ | db: | ||
+ | image: mariadb: | ||
+ | container_name: | ||
+ | environment: | ||
+ | - MYSQL_ALLOW_EMPTY_PASSWORD=yes | ||
+ | - MYSQL_DATABASE=pdns_db | ||
+ | - MYSQL_USER=pdns_user | ||
+ | - MYSQL_PASSWORD=pdns_password | ||
+ | restart: always | ||
+ | volumes: | ||
+ | - pdns-data:/ | ||
+ | command: [' | ||
+ | networks: | ||
+ | - pdns_network | ||
+ | |||
+ | pdns-authoritative: | ||
+ | image: pschiffe/ | ||
+ | restart: always | ||
+ | depends_on: | ||
+ | - db | ||
+ | networks: | ||
+ | - pdns_network | ||
+ | ports: | ||
+ | - " | ||
+ | - " | ||
+ | - " | ||
+ | environment: | ||
+ | - PDNS_gmysql_host=db | ||
+ | - PDNS_gmysql_port=3306 | ||
+ | - PDNS_gmysql_user=pdns_user | ||
+ | - PDNS_gmysql_dbname=pdns_db | ||
+ | - PDNS_gmysql_password=pdns_password | ||
+ | - PDNS_master=yes | ||
+ | - PDNS_api=yes | ||
+ | - PDNS_api_key=mbRmd3QY7k-Jmrg25KHjbagJ4W-e7ojszQKw | ||
+ | - PDNS_version_string=anonymous | ||
+ | - PDNS_default_ttl=1500 | ||
+ | - PDNS_allow_notify_from=0.0.0.0 | ||
+ | - PDNS_allow_axfr_ips=127.0.0.1, | ||
+ | - PDNS_launch=gmysql | ||
+ | - PDNS_local_address=0.0.0.0 | ||
+ | - PDNS_allow_notify_from=192.168.1.0/ | ||
+ | |||
+ | # webserver | ||
+ | - PDNS_webserver=yes | ||
+ | - PDNS_webserver_address=0.0.0.0 | ||
+ | - PDNS_webserver-allow-from=127.0.0.1, | ||
+ | - PDNS_webserver_password=secret2 | ||
+ | |||
+ | # pdns-recursor: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # - pdns-authoritative | ||
+ | # | ||
+ | # - pdns_network | ||
+ | # | ||
+ | # - " | ||
+ | # - " | ||
+ | # - " | ||
+ | # | ||
+ | # - PDNS_forward_zones_recurse=.=8.8.8.8; | ||
+ | # - PDNS_forward_zones=docker-station.loc=pdns-authoritative | ||
+ | # - PDNS_local_address=0.0.0.0 | ||
+ | # - PDNS_allow_from=0.0.0.0/ | ||
+ | # - PDNS_local-address=0.0.0.0 | ||
+ | # - PDNS_local-port=53 | ||
+ | # - PDNS_setuid=recursor | ||
+ | # - PDNS_setgid=recursor | ||
+ | # - PDNS_api-key=mbRmd3QY7k-Jmrg25KHjbagJ4W-e7ojszQKw | ||
+ | |||
+ | # # webserver | ||
+ | # - PDNS_webserver=yes | ||
+ | # - PDNS_webserver_address=0.0.0.0 | ||
+ | # #- PDNS_webserver-allow-from=127.0.0.1, | ||
+ | # - PDNS_webserver_password=secret2 | ||
+ | |||
+ | powerdns-admin: | ||
+ | image: powerdnsadmin/ | ||
+ | ports: | ||
+ | - " | ||
+ | depends_on: | ||
+ | - db | ||
+ | - pdns-authoritative | ||
+ | logging: | ||
+ | driver: json-file | ||
+ | options: | ||
+ | max-size: 50m | ||
+ | networks: | ||
+ | - pdns_network | ||
+ | environment: | ||
+ | - SQLALCHEMY_DATABASE_URI=mysql:// | ||
+ | - PDNS_API_URL=http:// | ||
+ | - PDNS_API_KEY=mbRmd3QY7k-Jmrg25KHjbagJ4W-e7ojszQKw # Ключ синхронизирован с authoritative | ||
+ | - PDNS_VERSION=4.7 | ||
+ | |||
+ | networks: | ||
+ | pdns_network: | ||
+ | name: pdns_network | ||
+ | driver: bridge | ||
+ | attachable: true | ||
+ | |||
+ | |||
+ | volumes: | ||
+ | pdns-data: {} | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | $ docker exec -it pdns-pdns-recursor-1 nslookup docker-station.loc pdns-authoritative | ||
+ | $ docker exec -it pdns-pdns-recursor-1 rec_control get-all | grep forward | ||
+ | $ docker exec -it pdns-pdns-recursor-1 rec_control wipe-cache ' | ||
+ | $ curl -H " | ||
+ | $ curl -H " | ||
+ | $ dig @192.168.1.132 lampa.loc +short | ||
+ | </ | ||
===== Mysql ===== | ===== Mysql ===== |