This project implements a basic DNS (Domain Name System) server using Rust. The goal is to build a fully functional DNS server that can resolve domain names to IP addresses while learning more about network programming in Rust.
- Basic DNS query handling (A records)
- Multi-threaded server for handling multiple client requests
- Caching of DNS responses
- Custom configuration for DNS resolution
- Error handling and logging
- Support for both IPv4 and IPv6
-
Clone the repository:
git clone https://github.com/ravikisha/RustDNS.git cd rust-dns-server
-
Install Rust (if not already installed): Follow instructions from rust-lang.org.
-
Build the project:
cargo build --release
-
Run the DNS server:
cargo run --release
-
Query the DNS server: You can use tools like
dig
to test the DNS server:dig @localhost example.com
-
Configuration:
- The DNS server is configurable through a
config.toml
file, allowing you to define the upstream DNS servers, TTL, and other settings.
- The DNS server is configurable through a
src/main.rs
: Entry point of the server.
Feel free to fork this repository and submit pull requests. Contributions to improve features or add support for more DNS record types are welcome.
This project is licensed under the MIT License. See the LICENSE
file for more details.