No description
Find a file
Maël e9e84ea076
Merge pull request #5 from luclu7/patch-2
defaults to ./config.ini
2020-12-23 21:45:00 -04:00
.github/workflows Github renamed master branch to main... 2020-12-13 20:22:11 -04:00
core Refactoring of some vars and funcs name 2020-12-21 23:12:02 -04:00
extra Port double dots is now hard written in the code 2020-12-22 21:26:39 -04:00
utils GORM logging level is now based on the AppMode configuration 2020-12-22 21:36:41 -04:00
.deepsource.toml Add .deepsource.toml 2020-12-13 18:33:16 +00:00
.gitignore Better dist dir 2020-12-13 20:12:10 -04:00
go.mod Switching from database/sql to GORM 2020-12-22 20:09:10 -04:00
go.sum Switching from database/sql to GORM 2020-12-22 20:09:10 -04:00
LICENCE Licence added 2020-12-13 15:16:24 -04:00
main.go defaults to ./config.ini 2020-12-24 01:08:32 +01:00
Makefile Service file 2020-12-13 21:05:00 -04:00
README.md Badges on readme 2020-12-22 21:41:20 -04:00

Sacrebleu

FOSSA Status DeepSource Github release action Github commit action

Sacrebleu is a DNS authoritative nameserver made in Go with github.com/miekg/dns library.

Records are stored in a SQL Database and cached using Redis.

This software requires a SQL server and a Redis server.

This software is currently in development and NOT ready for production.

Installation

Automated install

Each release contains a RPM and DEB package.

  • Download the latest package compatible with your system
  • Edit the config file in /etc/sacrebleu/config-dns.ini
  • Launch the database migration with sacrebleu-dns -sqlmigrate -config /etc/sacrebleu/config-dns.ini
  • Start the service systemctl start sacrebleu-dns

Manual Install

  • Download the latest release compatible with your system
  • Download and edit the configuration file
  • Launch the database migration with sacrebleu-dns -sqlmigrate -config [config path].ini
  • Download and edit the systemd service and put it in /lib/systemd/system/
  • Start the service systemctl start sacrebleu-dns

Arguments

You can show theses informations using ./sacrebleu-dns -h.

   -config string
        the patch to the config file (default "extra/config.ini.example")
  -sqlmigrate
        initialize / migrate the database

Configuration

Variables names are case sensitives.

Variable name Type Example Informations
AppMode string "production" Anything different than production will show debug messages
App Section
IP string ":" IP address on which the DNS server must listen. Blank to listen on all IPs
Port int 5353 Port on which the DNS server must listen
Logfile bool true Enable or disable file logs.
Database Section
IP string "127.0.0.1" SQL Database IP
Username string "sacrebleu" SQL Database Username
Password string "superSecretPassword" SQL Database Password
Port string "5432" SQL Database port ("5432" for postgres or "3306" for MySQL by default)
Db string "sacrebleudatabase" SQL Database Name
Type string "postgresql" SQL Database type. "postgresql" or "mysql" (anything different than "postgresql" will rollback to "mysql"
Redis Section
IP string "127.0.0.1" Redis Database IP
Password string "" Redis Database Password
Port int 6379 Redis Database port
Db int 0 Redis Database ID
Ttl int 10 Redis Time To Live (in seconds)

What is working

  • Read records (stricts & wildcard) from MySQL
  • Read and write records (stricts & wildcard) in Redis
  • Recursive wildcard for reverse DNS (IPv6 only)
  • Generate dynamic reverse DNS (IPv6 only)
  • Respond to all requested MySQL queries

ToDo

  • Recursive wildcard for reverse DNS (IPv4 part)
  • Generate dynamic reverse DNS (IPv4 part)
  • XFR
  • DNSSEC
  • Unit tests

License

FOSSA Status