Help us shape the future of Go! Take the 2026 Go Developer Survey

dnsforwarder

command module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2016 License: MIT Imports: 19 Imported by: 0

README

DnsForwarder

GitHub license Build Status Go Report Card

A dns server, cacher, and forwarder.

  • Resolve with multiple upstreams
  • Caching the record from upstreams
  • Support local hosts files
  • White list support

Getting started

Installation
Build from source

Make sure you have a correctly configured Go installtion first, then:

$ make bootstrap
$ go build
Install with package

Download packages from github releases page.

Configuration

forcetcp: If set it to true, server will use TCP connection with upstreams even the request from client is UDP request.

cache:

  • enable: Enable or disable in-memory cache
  • ttl: Default TTL for cache

loggers:

  • console:
    • enable: Enable or disable console logger
    • level: Log level for console logger
  • file:
    • enable: Enable or disable file logger
    • level: Log level for file logger
    • path: Log file path

timeout:

  • server:
    • read: Timeout for read from clients
    • write: Timeout for write to clients
  • forwarder:
    • read: Timeout for read from upstreams
    • write: Timeout for write to upstreams

host:

  • enable: Resolve with hosts files
  • resolvs: Hosts files list

upstreams: List of upstream dns servers

Running
Build from source
$ sudo dnsforwarder
Install from package
$ service dnsforwarder start # upstart
$ systemctl start dnsforwarder #systemd
Testing
$ dig domain.tld @your.server.ip

TODO

  • Cache persistence
  • Packaging
  • Hot-reload

Documentation

Overview

Dns Forwader, a dns server, cacher, and forwarder.

Usage:

sudo dnsforwader [options]

Use sudo command to gain the root privileges for dns default port 53.

Options:

-c Configuration file path (default: ./dnsforwarder.yml)
-h Server host (default: 127.0.0.1)
-p Server port (default: 53)
-d Enable debug mode (default:false)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL