Skip to content

A docker compose git repo to build a local libredns instance

License

Notifications You must be signed in to change notification settings

ebal/libredns-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libredns in a box

  • 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.

docker compose

Two step process:

  1. Get All files
  2. 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

Demo

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 !

test it

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

full demo

libredns demo

About

A docker compose git repo to build a local libredns instance

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages