MicroDNS

command module
v0.0.0-...-290e121 Latest Latest
Warning

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

Go to latest
Published: May 3, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

README

MicroDNS

A tiny dockerized DNS server in Go that (almost) always returns the same IP for any query sent to it.

Quick Start (TL;DR)

docker run -it --rm -p 53:53 -p 53:53/udp fffaraz/microdns:latest -log \
-ipv4 $(dig +short myip.opendns.com @resolver1.opendns.com) \
-ipv6 $(dig +short myip.opendns.com @2620:0:ccc::2 aaaa)

Arguments & Options

	-ipv4		Default IPv4 to return (default: 127.0.0.1)
	-ipv6		Default IPv6 to return (default: ::1)
	-ttl		Time to live value (default: 86400)
	-log		Log requests to stdout (default: false)
	-conf		Config file (default: /home/dns.conf)

Config file format

domain1.com.     127.0.0.1 ::1
domain2.com.     127.0.0.1 ::1
www.domain1.com. 127.0.0.1 ::1
ftp.domain2.com. 127.0.0.1 ::1

How to Run

docker run -d --restart=always -p 53:53 -p 53:53/udp --name microdns \
-v /home/microdns:/home \
fffaraz/microdns:latest \
-ipv4 127.0.0.1 \
-ipv6 ::1 \
-ttl 86400 \
-log \
-conf /home/dns.conf

Request Stats

IP Adresses: cat log.out | cut -f2 | sort | uniq -cd | sort -nr
Domains:     cat log.out | cut -f3 | sort | uniq -cd | sort -nr

Metadata API

curl http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address
curl http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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