From b8d0f83e6cea9640a7ee4402c163ad812237355d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 10 Dec 2023 11:48:01 +0000 Subject: Initial commit Signed-off-by: Laurent Bercot --- doc/index.html | 181 +++++++++++++++++++++++++++++++++++++ doc/shibari-server-tcp.html | 213 ++++++++++++++++++++++++++++++++++++++++++++ doc/shibari-server-udp.html | 163 +++++++++++++++++++++++++++++++++ doc/upgrade.html | 28 ++++++ 4 files changed, 585 insertions(+) create mode 100644 doc/index.html create mode 100644 doc/shibari-server-tcp.html create mode 100644 doc/shibari-server-udp.html create mode 100644 doc/upgrade.html (limited to 'doc') diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..fd59558 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,181 @@ + + + + + + shibari - a collection of DNS tools + + + + + + +

+Software
+skarnet.org +

+ +

shibari

+ +

What is it ?

+ +

+ shibari is a collection of DNS tools for Unix systems, as an +alternative to BIND, Unbound, djbdns or other similar suites of +programs. +

+ +

+ It was previously named s6-dns. The name of the project was changed to +avoid confusion; despite being written by the same author and with the +same mindset, it is not part of the s6 project. +

+ +

Why "shibari"?

+ +

+ There's a de facto tradition that DNS software has a name related to +binding. shibari aims to be the most pleasant of all DNS software. +

+ +
+ +

Installation

+ +

Requirements

+ + + +

Licensing

+ +

+ shibari is free software. It is available under the +ISC license. +

+ +

Download

+ + + +

Build and installation

+ + + +

Upgrade notes

+ + + +
+ +

Reference

+ +

Commands

+ +

+ All these commands exit 111 if they encounter a temporary error or +hardware error, and +100 if they encounter a permanent error - such as a misuse. Short-lived +commands exit 0 on success. Other exit codes are documented in the +relevant page. +

+ +

Command-line DNS clients programs

+ + + +

Caches

+ + + +

Servers

+ + + +

Filtering tools

+ + + +

Command-line qualification

+ + + +

DNS analysis and debug tools

+ + + +

Miscellaneous utilities

+ +

Libraries

+ +

Protocol implementation and synchronous resolution

+ + + +

Asynchronous resolution

+ + + +
+ + +

Related resources

+
+ +

shibari discussion

+ + + +

Similar work

+ + + + + diff --git a/doc/shibari-server-tcp.html b/doc/shibari-server-tcp.html new file mode 100644 index 0000000..5f36087 --- /dev/null +++ b/doc/shibari-server-tcp.html @@ -0,0 +1,213 @@ + + + + + + shibari: the shibari-server-tcp program + + + + + + +

+shibari
+Software
+skarnet.org +

+ +

The shibari-server-tcp program

+ +

+ shibari-server-tcp reads DNS queries on its standard input, and answers them +on its standard output. +

+ +
+

Interface

+
+ +
+     shibari-server-tcp [ -v verbosity [ -f tdbfile ] [ -r rtimeout ] [ -w wtimeout ]
+
+ + + +
+

Common usage

+
+ +

+ shibari-server-tcp is intended to be run under a TCP super-server such as +s6-tcpserver. +It delegates to the super-server the job of binding and listening to +the socket, accepting connections, and spawning a separate process to handle a +given connection. +

+ +

+ As such, a command line for shibari-server-tcp, running as user dns, listening +on address ${ip}, would typically look like this: +

+ +
+     s6-envuidgid dns s6-tcpserver -U -- ${ip} 53 s6-tcpserver-access -x rules.cdb -- shibari-server-tcp
+
+ +

+ Most users will want to run these command lines as services, i.e. daemons +run in the background when the machine starts. The examples/ subdirectory +of the shibari package provides service templates to help you run shibari-server-tcp under +OpenRC, +s6 and +s6-rc. +

+ +
+

Exit codes

+
+ +
+
0
Clean exit. There was a successful series of DNS exchanges +and tipideed received EOF, or timed out while the client was idle.
+
1
Invalid DNS query. The client spoke garbage.
+
100
Bad usage. shibari-server-tcp was run in an incorrect way: bad command +line options, or missing environment variables, etc.
+
101
Cannot happen. This signals a bug in shibari-server-tcp, and comes with an +error message asking you to report the bug. Please do so, on the +skaware mailing-list.
+
102
Misconfiguration. shibari-server-tcp found something in its DNS data file +that it does not like.
+
111
System call failed. This usually signals an issue with the +underlying operating system.
+
+ +
+

Environment variables

+
+ +

+ shibari-server-tcp expects the following variables in its environment, and will exit +with an error message if they are undefined. When run under +s6-tcpserver, +these variables are automatically set by the super-server. This is the way +shibari-server-tcp gets its network information without having to perform network +operations itself. +

+ +
+
TCPLOCALIP
+
The local IP address that the super-server is listening on.
+ +
TCPLOCALPORT
+
The local port that the super-server is listening on. In normal usage +this will be 53.
+ +
TCPREMOTEIP
+
The IP address of the client.
+ +
TCPREMOTEPORT
+
The remote port that the client is connecting from.
+
+ +

+ The following variables are optional, but will inform shibari-server-tcp's +behaviour. They are typically set by +s6-tcpserver-access +with the -i or -x option, when the access rules database +defines environment variables depending on client IP ranges. +

+ +
+
AXFR
+
If this variable is set, it controls what zones the client is allowed +to make AXFR queries for. A value of * (star) means the client is +allowed to make AXFR queries for any zone, same as when the variable is not +defined. Else, the value needs to be a space-, comma-, semicolon-, or +slash-separated list of zones; these are the allowed zones.
+ +
LOC
+
If this variable is set, it defines a client location that is used to +implement views. A client location is at most two charaters; if the value +is lo, then the client will be granted access to DNS data guarded +by a %lo location indicator in the +tinydns-data file. +Note that shibari-server-tcp ignores client IP prefix matching compiled in +the database via %lo:ipprefix lines: it only takes its location +information from the LOC variable, and will use the contents of LOC to match +lines ending with :%lo. The idea is to only have one place centralizing +what clients are authorized to do depending on their IP, and that place is the +s6-tcpserver-access +rules database.
+
+ +
+

Options

+
+ +
+
-v verbosity
+
Be more or less verbose. +A verbosity of 0 means no warnings, no logs, only error messages. 1 +means warnings and terse logs. 2 or more means more logs. +Default is 1.
+ +
-f tdbfile
+
Read DNS data from tdbfile. +The default is data.cdb, in the current working +directory of the shibari-server-tcp process.
+ +
-r rtimeout
+
Read timeout. If rtimeout milliseconds +elapse while shibari-server-tcp is waiting for a DNS query, just exit. +The default is 0, meaning infinite: shibari-server-tcp +will never close the connection until it receives EOF.
+ +
-w wtimeout
+
Write timeout. If shibari-server-tcp is unable +to send its answer in wtimeout milliseconds, which means the network is +congested, give up and close the connection. The default is 0, which +means infinite: shibari-server-tcp will wait forever until the network decongests in +order to send its answer.
+
+ +
+

Notes

+
+ + + + + diff --git a/doc/shibari-server-udp.html b/doc/shibari-server-udp.html new file mode 100644 index 0000000..c8e46f8 --- /dev/null +++ b/doc/shibari-server-udp.html @@ -0,0 +1,163 @@ + + + + + + shibari: the shibari-server-udp program + + + + + + +

+shibari
+Software
+skarnet.org +

+ +

The shibari-server-udp program

+ +

+ shibari-server-udp is a long-lived process. It binds to a UDP socket, then +answers DNS queries it receives, until it is killed. +

+ +
+

Interface

+
+ +
+     shibari-server-udp [ -v verbosity ] [ -d notif ] [ -f tdbfile ] [ -i rulesdir ] [ -x rulesfile ] [ -p port ] ip
+
+ + + +
+

Exit codes

+
+ +
+
0
Clean exit. shibari-server-udp received a SIGTERM and exited.
+
100
Bad usage. shibari-server-udp was run in an incorrect way: +typically bad command line options.
+
101
Cannot happen. This signals a bug in shibari-server-udp, and comes with an +error message asking you to report the bug. Please do so, on the +skaware mailing-list.
+
102
Misconfiguration. shibari-server-udp found something in its DNS data file +that it does not like.
+
111
System call failed. This usually signals an issue with the +underlying operating system.
+
+ +
+

Options

+
+ +
+
-v verbosity
+
Be more or less verbose. +A verbosity of 0 means no warnings, no logs, only error messages. 1 +means warnings and terse logs. 2 or more means more logs. +Default is 1.
+ +
-d notif
+
Write a newline to file descriptor notif, then close it, when +shibari-server-udp has bound its socket, opened its file, and is ready to serve. +This is the s6 +readiness notification mechanism. By default, when this option isn't given +no readiness notification is sent.
+ +
-f tdbfile
+
Read DNS data from tdbfile. +The default is data.cdb, in the current working +directory of the shibari-server-udp process.
+ +
-i rulesdir
+
Use rulesdir as a filesystem-based +access rules +database: ignore any message whose originating IP address isn't +explicitly allowed. The access rules database is also used to get +client location information. +If something in rulesdir changes while shibari-server-udp is +running, it will immediately pick up the change.
+ +
-x rulesfile
+
Use rulesfile as a cdb +access rules +database, see description of -i above. -i and +-x are equivalent; you can switch between rulesdir +and rulesfile via the +s6-accessrules-cdb-from-fs and +s6-accessrules-fs-from-cdb +programs. The cdb format is more efficient but more static than the +filesystem format. If rulesfile changes while shibari-server-udp +is running, it will continue to use the old data until it receives a SIGHUP.
+ +
-p port
+
Binds to port port. Default is 53.
+
+ +
+

Client location

+
+ +

+ shibari-server-udp ignores client location information given as +%lo:ipprefix lines in the file created by +tinydns-data. +Instead, it reads client location information in LOC definitions +present in the rulesdir or rulesfile +access rules database. For instance, +if you have a %lo:1.2.3 line in your text data file, meaning +that clients whose IP address is in the 1.2.3.0/24 IPv4 +range are identified with the lo location and that DNS data +entries ending with :lo are visible to them, you need to +translate this information into the accessrules format. Your +rulesdir must contain the following files: +

+ + + +

+ (To use the -x option instead, you'd do the same, then run +s6-accessrules-cdb-from-fs rulesfile rulesdir +to compile the information into rulesfile.) +

+ +
+

Notes

+
+ + + + + diff --git a/doc/upgrade.html b/doc/upgrade.html new file mode 100644 index 0000000..52eeaa5 --- /dev/null +++ b/doc/upgrade.html @@ -0,0 +1,28 @@ + + + + + + shibari: how to upgrade + + + + + + +

+shibari
+Software
+skarnet.org +

+ +

What has changed in shibari

+ +

in 0.0.1.0

+ +
    +
  • Initial release.
  • +
+ + + -- cgit v1.3.1