Install
Install rDNS in 60 seconds.
Single static binary. systemd unit, FreeBSD rc.d script, and Dockerfile included.
Linux with systemd
Build, install, enable.
# Build (Rust 1.85+)
cargo build --release
# Install
sudo install -Dm755 target/release/rdns /usr/local/bin/rdns
sudo install -Dm755 target/release/rdns-control /usr/local/bin/rdns-control
sudo install -Dm644 rdns.toml.example /etc/rdns/rdns.toml
sudo install -Dm644 dist/rdns.service /etc/systemd/system/rdns.service
# Create user
sudo useradd -r -s /usr/sbin/nologin rdns
# Run
sudo systemctl daemon-reload
sudo systemctl enable rdns
sudo systemctl start rdns
Verify
dig @127.0.0.1 example.com
sudo systemctl status rdns
rdns-control stats
FreeBSD with rc.d
# Build
cargo build --release
# Install
sudo install -m 755 target/release/rdns /usr/local/bin/rdns
sudo install -m 755 target/release/rdns-control /usr/local/bin/rdns-control
sudo install -m 644 rdns.toml.example /usr/local/etc/rdns/rdns.toml
sudo install -m 755 dist/rdns.rc /usr/local/etc/rc.d/rdns
# Enable and start
sudo sysrc rdns_enable=YES
sudo service rdns start
FreeBSD builds use Capsicum sandboxing automatically.
Docker
# Build the image
docker build -t rdns .
# Run
docker run -d \
-p 53:53/udp \
-p 53:53/tcp \
-v /etc/rdns:/etc/rdns \
--name rdns \
rdns
Verify
dig @127.0.0.1 example.com
docker logs rdns
Cargo install
# From the repository
cargo install --path .
# With PostgreSQL backend
cargo install --path . --features postgres
This places rdns and rdns-control in ~/.cargo/bin/.
From source
git clone https://github.com/ZerosAndOnesLLC/rDNS.git
cd rDNS
# Release build with native CPU optimizations
RUSTFLAGS="-C target-cpu=native" cargo build --release
# Validate config
./target/release/rdns -c rdns.toml.example --check-config
# Run
./target/release/rdns -c rdns.toml.example
Configuration
rDNS uses TOML. Copy rdns.toml.example and adjust. The most common starting point is forwarder mode:
[server]
mode = "resolver"
[listeners]
udp = ["0.0.0.0:53", "[::]:53"]
tcp = ["0.0.0.0:53", "[::]:53"]
[resolver]
forwarders = ["1.1.1.1", "8.8.8.8"]
dnssec = true
See the configuration reference for every option, or the use cases page for ready-made configs.
Get rDNS running in 60 seconds.
Single static binary. TOML config. MIT licensed. Linux, FreeBSD, and macOS.