-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: DNS backend #876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
c256de6
a68dd79
2b1ea2f
628b37f
4fb4e45
f06bc91
8d02f8c
616ebb7
cfb2d31
0a10df5
29a44c8
abe8881
89ff34d
7055719
81ea9b5
cc18b0a
96e24ef
cc0a1fc
64042b3
1b86e67
d41f35c
f3b50cb
3af34a1
66744f1
1ab6dde
302a639
0fce07e
f7c6d78
b45b491
557fea9
0744b24
fe23997
a31402b
2f1b6d6
869f13e
516238d
cd2494f
134c1c6
cd6e81c
066e6f3
32aa746
ac2bb31
213fe76
73fdc22
a017638
14e2fa6
d138c25
ba7c920
b3e5600
019d502
58a79fe
f96ba64
2c2afb5
1f90a93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||||||||||||||||||||||||||
| FROM alpine:3.20 AS builder | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| RUN apk add --no-cache --virtual .build-deps \ | ||||||||||||||||||||||||||||||
| build-base \ | ||||||||||||||||||||||||||||||
| lmdb-dev \ | ||||||||||||||||||||||||||||||
| openssl-dev \ | ||||||||||||||||||||||||||||||
| boost-dev \ | ||||||||||||||||||||||||||||||
| autoconf automake libtool \ | ||||||||||||||||||||||||||||||
| git ragel bison flex \ | ||||||||||||||||||||||||||||||
| lua5.4-dev \ | ||||||||||||||||||||||||||||||
| curl-dev | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| RUN apk add --no-cache \ | ||||||||||||||||||||||||||||||
| lua \ | ||||||||||||||||||||||||||||||
| lua-dev \ | ||||||||||||||||||||||||||||||
| lmdb \ | ||||||||||||||||||||||||||||||
| boost-libs \ | ||||||||||||||||||||||||||||||
| openssl-libs-static \ | ||||||||||||||||||||||||||||||
| curl \ | ||||||||||||||||||||||||||||||
| libstdc++ | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| RUN git clone https://github.com/PowerDNS/pdns.git /pdns | ||||||||||||||||||||||||||||||
| WORKDIR /pdns | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| RUN git submodule init &&\ | ||||||||||||||||||||||||||||||
| git submodule update &&\ | ||||||||||||||||||||||||||||||
| git checkout auth-5.0.1 | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| RUN autoreconf -vi | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| RUN mkdir /build && \ | ||||||||||||||||||||||||||||||
| ./configure \ | ||||||||||||||||||||||||||||||
| --sysconfdir=/etc/powerdns \ | ||||||||||||||||||||||||||||||
| --enable-option-checking=fatal \ | ||||||||||||||||||||||||||||||
| --with-dynmodules='lmdb' \ | ||||||||||||||||||||||||||||||
| --with-modules='' \ | ||||||||||||||||||||||||||||||
| --with-unixodbc-lib=/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE) && \ | ||||||||||||||||||||||||||||||
| make clean && \ | ||||||||||||||||||||||||||||||
| make $MAKEFLAGS -C ext &&\ | ||||||||||||||||||||||||||||||
| make $MAKEFLAGS -C modules &&\ | ||||||||||||||||||||||||||||||
| make $MAKEFLAGS -C pdns && \ | ||||||||||||||||||||||||||||||
| make -C pdns install DESTDIR=/build &&\ | ||||||||||||||||||||||||||||||
| make -C modules install DESTDIR=/build &&\ | ||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
+43
|
||||||||||||||||||||||||||||||
| --with-unixodbc-lib=/usr/lib/$(dpkg-architecture -q DEB_BUILD_GNU_TYPE) && \ | |
| make clean && \ | |
| make $MAKEFLAGS -C ext &&\ | |
| make $MAKEFLAGS -C modules &&\ | |
| make $MAKEFLAGS -C pdns && \ | |
| make -C pdns install DESTDIR=/build &&\ | |
| make -C modules install DESTDIR=/build &&\ | |
| --with-unixodbc-lib=/usr/lib && \ | |
| make clean && \ | |
| make $MAKEFLAGS -C ext &&\ | |
| make $MAKEFLAGS -C modules &&\ | |
| make $MAKEFLAGS -C pdns && \ | |
| make -C pdns install DESTDIR=/build &&\ | |
| make -C modules install DESTDIR=/build &&\ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ share/python-wheels/ | |
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
| resolve.conf | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. это нужно? |
||
|
|
||
| # PyInstaller | ||
| # Usually these files are written by a python script from a template | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| setLocal('0.0.0.0:53') | ||
| controlSocket('0.0.0.0:8084') | ||
| setKey('supersecretapikey') | ||
| addConsoleACL('172.20.0.0/24') | ||
| includeDirectory('/etc/dnsdist/conf.d/') | ||
| setACL('0.0.0.0/0') |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -347,27 +347,52 @@ services: | |
| - traefik.tcp.routers.kpasswd.service=kpasswd | ||
| - traefik.tcp.services.kpasswd.loadbalancer.server.port=464 | ||
|
|
||
| bind_dns: | ||
| image: ghcr.io/multidirectorylab/multidirectory_bind9:${VERSION:-latest} | ||
| container_name: bind9 | ||
| hostname: bind9 | ||
| restart: unless-stopped | ||
| pdns_auth: | ||
| image: ghcr.io/multidirectorylab/multidirectory_pdns_auth:${VERSION:-latest} | ||
| container_name: pdns_auth | ||
| networks: | ||
| default: | ||
| dns_net: | ||
| ipv4_address: 172.20.0.4 | ||
| expose: | ||
| - 8082 | ||
| - 53/udp | ||
| - 53/tcp | ||
| volumes: | ||
| - dns_server_file:/opt/ | ||
| - dns_server_config:/etc/bind/ | ||
| tty: true | ||
| env_file: | ||
| - .env | ||
| environment: | ||
| - USE_CONFIG_FILE_LOGGING=true | ||
| depends_on: | ||
| ldap_server: | ||
| condition: service_healthy | ||
| restart: true | ||
| labels: | ||
| - traefik.enable=true | ||
| - traefik.udp.routers.bind_dns_udp.entrypoints=bind_dns_udp | ||
| - traefik.udp.services.bind_dns_udp.loadbalancer.server.port=53 | ||
| - dns_lmdb:/var/lib/pdns-lmdb | ||
| - dns_config:/etc/powerdns | ||
|
|
||
|
|
||
| pdns_recursor: | ||
| image: powerdns/pdns-recursor-51:5.1.7 | ||
| container_name: pdns_recursor | ||
| networks: | ||
| default: | ||
| dns_net: | ||
| ipv4_address: 172.20.0.2 | ||
| expose: | ||
| - 8083 | ||
| - 53/udp | ||
| - 53/tcp | ||
| volumes: | ||
| - ./recursor.conf:/etc/powerdns/recursor.conf | ||
| - forward_zones:/etc/powerdns/recursor.d/ | ||
|
|
||
| pdnsdist: | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. или так принято
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Официально оно просто dnsdist называется |
||
| image: powerdns/dnsdist-19:1.9.11 | ||
| container_name: pdnsdist | ||
| networks: | ||
| default: | ||
| dns_net: | ||
| ipv4_address: 172.20.0.3 | ||
| expose: | ||
| - 8084 | ||
| ports: | ||
| - "53:53/tcp" | ||
| - "53:53/udp" | ||
| volumes: | ||
| - ./dnsdist.conf:/etc/dnsdist/dnsdist.conf | ||
| - dnsdist_confd:/etc/dnsdist/conf.d | ||
|
|
||
| kea_dhcp4: | ||
| image: ghcr.io/multidirectorylab/multidirectory_dhcp4:${VERSION:-latest} | ||
|
|
@@ -467,6 +492,14 @@ services: | |
| environment: | ||
| HANDLER_NAME: event_sender-1 | ||
|
|
||
| networks: | ||
| dns_net: | ||
| driver: bridge | ||
| ipam: | ||
| config: | ||
| - subnet: 172.20.0.0/24 | ||
| gateway: 172.20.0.1 | ||
|
|
||
| volumes: | ||
| postgres: | ||
| kdc: | ||
|
|
@@ -478,3 +511,7 @@ volumes: | |
| leases: | ||
| sockets: | ||
| dhcp: | ||
| dns_lmdb: | ||
| dns_config: | ||
| forward_zones: | ||
| dnsdist_confd: | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||
| launch=lmdb | ||||||
| lmdb-filename=/var/lib/pdns-lmdb/pdns.lmdb | ||||||
| daemon=no | ||||||
| local-address=0.0.0.0 | ||||||
| local-port=53 | ||||||
| api=yes | ||||||
| api-key=supersecretapikey | ||||||
rimu-stack marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| webserver-allow-from=0.0.0.0/0 | ||||||
|
||||||
| webserver-allow-from=0.0.0.0/0 | |
| webserver-allow-from=127.0.0.1,::1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Здесь то же самое
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,10 @@ | ||||||
| local-address=0.0.0.0 | ||||||
| webserver-allow-from=0.0.0.0/0 | ||||||
|
||||||
| webserver-allow-from=0.0.0.0/0 | |
| webserver-allow-from=127.0.0.1/32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Пока сделано так, в дальнейшем, при добавлении PowerDNS DNSdist будет переделано.
Uh oh!
There was an error while loading. Please reload this page.