This tutorial will show you how to run your own DNS seed.
It will describe how you can achieve this using nubits-seeder and cf-php.
Nubits-seeder is a small crawler, that checks for live nodes on NuNet. Cf-php is a script which queries the CloudFlare API and enters the seed nodes crawled by nubits-seeder into the DNS zone file.
You can find the repo for both programs here: https://github.com/bananenwilly/nubits-seeder
We will not talk much about nubits-seeder in this tutorial. Cf-php is where the magic happens.
It reads a file called dnsseed.dump in the nubits-seeder root directory, which is continuously created when nubits-seeder is crawling for nodes. It will generate an IP-table from the dnseed.dump file and pushes this table to a CloudFlare (CF) enabled domain of your choice over the Cloudflare API.
A DNS zone file created by cf-php will look something like this:
There is no need for you to run your own DNS server. It’s using the DNS servers provided by CloudFlare.
CloudFlare.com account
Domain (e. g. praisejordanleeourlordandsaviour.com) configured to use CF's DNS servers
small server (Raspberry Pis can easily handle this)
php5-cli, php5-curl, nubits-seeder repo
you may need to install lib-boost on your system to compile this (on Debian based systems: sudo apt-get install libboost-all-dev)
Get your CF API Key (CloudFlare.com -> My Settings -> Account -> API Key -> View API Key) and have it ready
install php5-cli and php5-curl
Download and start nubits-seeder
Open cf-php/cf.php in an editor of your choice and edit the config paramters accordingly.
Have a cronjob run cf-php regularly
This will run the cf.php script every minute.
That should be it. You now have your own Nu DNS seed.