- work in progress - not ready !
This code repository wants to provide a libredns (kind of) quick solution for self-hosted environments.
This specific repo, uses OpenNic and StevenBlack default blacklisting.
Two step process:
- Get All files
- Run PowerDNS Recursor
---
services:
bash:
image: bash
env_file:
- path: ./default.env
required: true
command: >
bash -c "mkdir -p recursor.d && cd recursor.d
&& apk add -q curl bind-tools
&& curl -sO https://raw.githubusercontent.com/ebal/libredns-docker/refs/heads/main/get_files.sh
&& bash get_files.sh"
working_dir: /tmp
volumes:
- ./:/tmp
healthcheck:
test: ["CMD", "test", "-f", "/tmp/OpenNIC"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
pdns-rec:
image: powerdns/pdns-recursor-52
hostname: pdns-rec
container_name: pdns-rec
depends_on:
bash:
condition: service_completed_successfully
env_file:
- path: ./default.env
required: true
ports:
- "1053:53/udp"
volumes:
- ./recursor.d:/etc/powerdns/recursor.d:ro
With docker compose up and down, you can also make the update on blacklist files.
docker compose up -d
takes a little time to start ... black host file is huge !
with
dig @127.0.0.1 -p 1053 analytics.google.com
output should be something like:
analytics.google.com. 86400 IN A 0.0.0.0