DNS seed server for Grin
In order to compile and run Grin on your machine, you should have installed:
- Git - to clone the repository
- Rust - 1.21.0 or greater via Rustup - Can be installed via your package manager or manually via the following commands:
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
git clone https://github.com/mimblewimble/seeder.git
cd grin-seeder
git checkout 0.1
cargo build
Let's say you want to run your dns seed on seed.example.com. In that case, you'll need an authorative NS record in example.com's domain record, poiting to, for example, vps.example.com:
$ dig -t NS seed.example.com
;; ANSWER SECTION
seed.example.com. 86400 IN NS vps.example.com.
Then, on the system vps.example.com, you can run grin-seeder:
grin-seeder -h dnsseed.example.com -n vps.example.com
If you want the DNS server to report SOA records, please provide an e-mail address (with the @ part replaced by .) using -m.
Typically, you'll need root privileges to listen to port 53 (name service).
One solution is using an iptables rule (Linux only) to redirect it to a non-privileged port:
$ iptables -t nat -A PREROUTING -p udp --dport 53 -j REDIRECT --to-port 5353
If properly configured, this will allow you to run grin-seeder in userspace, using the -p 5353 option.