Skip to content

Equibit/equibit-seeder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

150 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

equibit-seeder
==============

Equibit-seeder is a crawler for the Equibit network, which exposes a list
of reliable nodes via a built-in DNS server.

See https://github.com/Equibit/equibit/wiki/EQB-DNS-Seeder for more information

Features:
* regularly revisits known nodes to check their availability
* bans nodes after enough failures, or bad behaviour
* accepts nodes down to v0.02.22 to request new IP addresses from,
  but only reports good post-v0.02.22 nodes.
* keeps statistics over (exponential) windows of 2 hours, 8 hours,
  1 day and 1 week, to base decisions on.
* very low memory (a few tens of megabytes) and cpu requirements.
* crawlers run in parallel (by default 96 threads simultaneously).

REQUIREMENTS
------------

$ sudo apt-get install build-essential libboost-all-dev libssl-dev


COMPILING
---------

Compiling will require boost and ssl.  On debian systems, these are provided
by `libboost-dev` and `libssl-dev` respectively.

$ make

This will produce the `dnsseed` binary.


USAGE
-----

Choose a domain or subdomain that will be the hostname for the dns seed.
For example: dnsseed.myequibit.org

Create an A record in the DNS entries for this hostname with the address of 
the machine or container that will be running the dns seeder service.

On the machine or container, run dnsseed as follows:

./dnsseed -h dnsseed.myequibit.org -n 1.2.3.4 -m noreply@myequibit.org

Where:
-h: The DNS name that the DNS server will respond to. Should match the
    hostname set up to point to the seeder.
    
-n: The IP address of the DNS server

-m: The email address that the seeder will use to report SOA records.


RUNNING AS NON-ROOT
-------------------

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 dnsseed in userspace, using
the -p 5353 option.


DISABLING EXISTING DNS SERVERS ON UBUNTU
----------------------------------------

Ubuntu distributions already run a DNS server, so it will not be possible to run
a secondary DNS server without stopping the existing DNS server. Use the following
instructions to stop the built-in DNS server:

1. Stop the resolved service
`sudo systemctl stop systemd-resolved`

2. Edit `/etc/systemd/resolved.conf` and make the following changes:

2.1. Set an explicit external DNS server to use. For example:
DNS=8.8.8.8

2.2. Disable the stub listener:
DNSStubListener=no

3. Apply the symlink to the new resolved.conf file:
`sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf`

Sourced from https://medium.com/@niktrix/getting-rid-of-systemd-resolved-consuming-port-53-605f0234f32f

About

Equibit DNS seeder

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 85.1%
  • C 13.6%
  • Other 1.3%