Code Monkey home page Code Monkey logo

lua-dnsdist-ootb's Introduction

What is this?

powerdns dnsdist 1.7.x powerdns dnsdist 1.8.x

LUA module to run dnsdist in a quick way.

Your configuration is composed of the following parts with YAML format:

  • services: DNS services to start (DNS, DoH, DoT)
  • admin: Enables the console, web API and more
  • rules: Defines how to handle your DNS traffic

See the complete configuration file for all options.

Installation

  1. Copy dnsdist_ootb.lua and the folder dnsdist_ootb in your dnsdist configuration folder (the default is /etc/dnsdist)
  2. Update your dnsdist.conf with the following code to import the LUA module.
-- Import module and load the YAML config
dnsdistpath = "/etc/dnsdist/"
package.path = dnsdistpath .. package.path
dnsdist_ootb = require "dnsdist_ootb"
dnsdist_ootb.loadConfig{file=dnsdistpath .. "dnsdist.yml"}

Get started

Create a new configuration file /etc/dnsdist/dnsdist.yml file and copy the content of the minimal configuration example to start dnsdist like a Forwarding and Caching DNS Server to a pool of DNS public servers.

# Basic Forwarding and Caching DNS Server to a pool of public DNS server
# load balancing of the outgoing traffic to a pool of dns servers in round robin
rules:
  - upstreams:
      dns:
        - ip: 8.8.8.8
        - ip: 9.9.9.9
        - ip: 1.1.1.1

Examples

Docker

  1. Create the folder conf with the following content

    • conf/
      • dnsdist_ootb/
      • dnsdist_ootb.lua
      • dnsdist.conf
      • dnsdist.yml
  2. Import the module for the docker image like this

-- Import module
dnsdistpath = "/etc/dnsdist/conf.d/"
package.path = dnsdistpath .. package.path
dnsdist_ootb = require "dnsdist_ootb"
dnsdist_ootb.loadConfig{file = dnsdistpath .. "dnsdist.yml"}
  1. Configure your dnsdist.yml config file

  2. Then mount the folder as a volume

sudo docker run -d -p 53:53/udp -p 53:53/tcp --restart unless-stopped --name=dnsdist \
 --volume=$PWD/conf/:/etc/dnsdist/conf.d/ powerdns/dnsdist-17:1.7.2

lua-dnsdist-ootb's People

Contributors

dmachard avatar jsoref avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jsoref vanonox

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.