SlimDNS

slimDNS is a simple DNS server. Its purpose is to be a self-contained, slim and uncomplicated executable.

It relies on PostgreSQL for its zone and record information.

Installation

Install slimDNS-gitAUR or clone github.com/Torxed/slimDNS and follow the manual setup instructions.

Manual setup (optional)

Create a user/role called "slimdns"

[postgres@machine~] createuser --interactive
[postgres@machine~] psql
> CREATE DATABASE slimdns OWNER slimdns;
> ALTER USER slimdns WITH PASSWORD '<some secure random string>';

Running

start and enable slimDNS.service.

Or if preferred, running it manually:

# python slimdns.py

Configuration

Configuration is stored under /etc/slimDNS/config.py, any changes to it requires a restart.

SlimDNS comes with a tool to modify the database, it is called dnstool (subject to name change). The tool takes a series of parameters in order and can create domains (zones) and records.

Note: Creating a domain, will not set up SOA or NS records by default. However, creating a record will automatically set up a SOA and NS record if the specified domain is not found.

Adding a domain (optional)

# python dnstool.py example.com

Adding a A record

# python dnstool.py example.com 46.21.102.81
Note: Again, if the domain example.com did not exist, a domain entry would be inserted and appropriate SOA and NS records will be inserted as well for this new domain.

You can also add the same record, but define the record type:

# python dnstool.py example.com 46.21.102.81 A

Adding a MX record/complex records

Some records have more complex structure, for instance the SRV, MX or TXT records. In order to be generic in handling these records, enclose the content of the record and add all the necessary data needed for the desired record type.

# python dnstool.py example.com "46.21.102.81 10" MX

This would create a MX record, with a priority or preference of 10.

Handy information

  • Updates run time cache every 30 seconds.
  • Does support a forwarding DNS server, however, testing on this is limited
  • Upon each start, slimdns will attempt to create the database 'slimdns' if not found, but will need this optional permissions to work.
  • Might crash for no aparent reason :D
gollark: <@345300752975003649> <@341618941317349376>
gollark: 🔥🦊: A Browser Which Isn't Chrome™
gollark: https://i.osmarks.tk/gVO9.jpg
gollark: `null`
gollark: How to Write Perfect Python Command-line Interfaces (blog.sicara.com)submitted 5 hours ago by __yannickw__ 60 commentssharesavehidegive awardreportcrosspost2120A tiny compiler with ELF and PE executable for x86 (github.com)submitted 13 hours ago by l0n3_c0d3r 24 commentssharesavehidegive awardreportcrosspost327Why you should learn F# (dusted.codes)submitted 4 hours ago by dustinmoris 28 commentssharesavehidegive awardreportcrosspost41635Sandspiel – A falling sand game built in Rust and WebGL (sandspiel.club)submitted 1 day ago by j_orshman 131 commentssharesavehidegive awardreportcrosspost547Implementing VisiCalc (2015) (rmf.vc)submitted 10 hours ago by erad 1 commentsharesavehidegive awardreportcrosspost6•16x AA font rendering using coverage masks (part III) (superluminal.eu)submitted an hour ago by rovarma commentsharesavehidegive awardreportcrosspost7357The Consequences of Your Code | Tom Scott (youtube.com)submitted 1 day ago by STR_Warrior 59 commentssharesavehidegive awardreportcrosspost816Building a telegram Bot from scratch - R (codecampanion.blogspot.com)
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.