A small recursive DNS server written in Rust. It listens on UDP 0.0.0.0:2053, walks the DNS hierarchy starting from the root server at 198.41.0.4, and returns answers for common record types (A, AAAA, NS, CNAME, MX).
- Install Rust (edition 2024 is used).
- From the project root, run:
cargo build
- Start the server:
cargo run
- The process logs incoming questions and the records returned.
- From another terminal, ask for a record with
dig:dig @127.0.0.1 -p 2053 example.com A- Swap
AforAAAA,NS,CNAME, orMXto try other types.
- UDP only; no TCP fallback.
- No caching; each query is resolved from the root.
- Response size is limited to 512 bytes.
- No DNSSEC handling.