A recursive DNS server using .NET
- Implements RFC1034, RFC1035 and a few later RFCs for modern DNS and for IPv6
- Supports UDP and TCP for A & AAAA query and status request
- SQLite for caching and negative caching, with replacement based on TTL
- Supports local resolution with wildcard domains
- Run the server
dotnet run
- Query the server using python's dns library
py testdns.py <domain>
- Query the server using dig
dig @localhost -p <port> <domain> <type>
The server and DNS properties are in a TOML file => config.toml.
(See TOML format spec)
-
Port, TCP availability, verbosity & other DNS properties
port- The port to listen ontcp- Whether to listen on TCPverbosity- The verbosity of the loggingdb_file- The path to the cache database filedb_setup- The path to the cache database setup file- Add or remove root hints (don't do either)
-
Local resolutions
Follow the instructions in the config file comments
# ============================================= # # LOCAL RESOLUTION # # Add your local resolution rules under here # # with the format of: # # # # [[simp_dns.local_resolution]] # # domain = <domain> # # 1 = <ipv4_address> # # 28 = <ipv6_address> # # # # Note: <domain> can also be a wildcard domain. # # Don't need both IPv4 and IPv6 addresses # # for local resolution to work. # # ============================================= #