Skip to content

luciangutu/go_wildcard_dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Wildcard DNS Server

A simple wildcard DNS server written in Go. This server responds with a configurable A record for any DNS query.

Features

  • Wildcard DNS server
  • Configurable A record IP address

Prerequisites

  • Docker
  • Go

Build the container

docker build -t wildcard-dns-server .

Run the server

Run the container with the desired IP address for A records.

Replace 192.168.100.1 with the IP address you want the server to respond with for A records.

The DNS server will listen on port 53 for UDP queries and respond with the specified IP address for any query.

docker run --rm --name dns-server wildcard-dns-server 192.168.100.1

Example usage

Query the DNS server using dig or another DNS client (replace localhost with the container IP):

dig @localhost example.com

Loadtesting

queries.txt content

example.com A
test.example.com A

Run the loadtest for 60 seconds.

dnsperf -s <server_ip_address> -d queries.txt -l 60

About

A simple wildcard DNS server written in Go.

Topics

Resources

Stars

Watchers

Forks