-
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
45a1f21
c31aa76
4472cec
aa09101
db5e368
7b24a73
6d6dd7b
d038b3d
4feaf48
6a4ff47
1daafbd
cdd6cb9
59d109a
fbcebe3
a6ceb1c
0e722a2
39d12cd
7e5146d
275b920
4631882
7657feb
66ee513
ac8ceb9
943f442
5b717b9
8c6087d
50c7f94
45bc73c
bc1948f
36c99b5
2dcda51
0def50b
baed459
434d144
8bd9a0e
839fb40
0aaf3cb
a2573aa
afd8575
d2d4c3a
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 &&\ | ||
| make clean && \ | ||
| strip /build/usr/local/bin/* /build/usr/local/sbin/* /build/usr/local/lib/pdns/*.so | ||
|
|
||
| FROM alpine:3.20 AS runtime | ||
|
|
||
| COPY --from=builder /build / | ||
|
|
||
| RUN apk add --no-cache \ | ||
| lua \ | ||
| lua-dev \ | ||
| lmdb \ | ||
| boost-libs \ | ||
| openssl-libs-static \ | ||
| curl \ | ||
| libstdc++ | ||
|
|
||
| RUN mkdir -p /etc/powerdns/pdns.d /var/run/pdns /var/lib/powerdns /etc/powerdns/templates.d /var/lib/pdns-lmdb | ||
|
|
||
| COPY ./.package/pdns.conf /etc/powerdns/pdns.conf | ||
|
|
||
| EXPOSE 8082/tcp | ||
|
|
||
| CMD ["/usr/local/sbin/pdns_server"] |
| 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('PSAag0AEziPZuBB7kdcfIEkVJOyQInRcBRAhadWDpU0=') | ||
| 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 | ||||
|---|---|---|---|---|---|---|
| @@ -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 | ||||||
|
||||||
| api-key=supersecretapikey | |
| api-key=${PDNS_API_KEY} |
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.
API не торчит наружу из сети докера. Сделано так, потому что без ключа API не работает.
Copilot
AI
Dec 24, 2025
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.
The webserver is configured to allow connections from any IP address (0.0.0.0/0). This is a security risk in production environments. Consider restricting access to specific IP ranges or implementing additional authentication mechanisms.
| 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.