From b00f175fa423f0f48c13b2966bbb84f9a21d0004 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 14 Feb 2021 12:09:26 +0100 Subject: [PATCH] Fix HTML documentation generation. --- Makefile.am | 4 ++++ index.html | 8 ++++---- src/Makefile.am | 4 ---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 91ad127..b35b8ff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,10 @@ man_MANS = rinetd.8 sysconf_DATA = rinetd.conf noinst_DATA = index.html +# If roffit is available, regenerate index.html +index.html: rinetd.8 + if which roffit >/dev/null 2>&1; then roffit < $^ > $@; else touch $@; fi + # This is for Travis CI; we don’t have a testsuite yet. test: diff --git a/index.html b/index.html index a602827..551f3dd 100644 --- a/index.html +++ b/index.html @@ -79,7 +79,7 @@ p.roffit {

Ports default to TCP. To specify the protocol, append /udp or /tcp to the port number:

206.125.69.81 80/tcp 10.1.1.2 8000/udp

Service names can be specified instead of port numbers. On most systems, service names are defined in the file /etc/services. -

Both IP addresses and hostnames are accepted for bindaddress and connectaddress. +

Both IP addresses and hostnames are accepted for bindaddress and connectaddress, including IPv6.

UDP timeout option

Since UDP is a connectionless protocol, a timeout is necessary or forwarding connections may accumulate with time and exhaust resources. By default, if no data is sent or received on a UDP connection for 72 seconds, the other connection is closed. This value can be changed using the timeout option: @@ -87,8 +87,8 @@ p.roffit {

This rule will forward all data received on UDP port 8000 to host 10.1.1.2 on TCP port 80, and will close the connection after no data is received on the UDP port for 3600 seconds.

Source address option

A forwarding rule option allows to bind to a specific local address when sending data to the other end. This is done using the src option: -

192.168.1.1 80 10.1.1.2 80 [src=192.168.1.2] -

Assuming the local host has two IP addresses, 192.168.1.1 and 192.168.1.2, this rule ensures that forwarded packets are sent using source address 192.168.1.2. +

192.168.1.1 80 10.1.1.127 80 [src=10.1.1.2] +

Assuming the local host has two IP addresses, 10.1.1.1 and 10.1.1.2, this rule ensures that forwarded packets are sent using source address 10.1.1.2.

ALLOW AND DENY RULES

Configuration files can also contain allow and deny rules.

Allow rules which appear before the first forwarding rule are applied globally: if at least one global allow rule exists, and the address of a new connection does not satisfy at least one of the global allow rules, that connection is immediately rejected, regardless of any other rules. @@ -130,7 +130,7 @@ p.roffit {

The server redirected to is not able to identify the host the client really came from. This cannot be corrected; however, the log produced by rinetd provides a way to obtain this information. Under Unix, Sockets would theoretically lose data when closed with SO_LINGER turned off, but in Linux this is not the case (kernel source comments support this belief on my part). On non-Linux Unix platforms, alternate code which uses a different trick to work around blocking close() is provided, but this code is untested.

The logging is inadequate. The duration of each connection should be logged.

LICENSE

Copyright (c) 1997, 1998, 1999, Thomas Boutell and Boutell.Com, Inc. -

Copyright (c) 2003-2017 Sam Hocevar +

Copyright (c) 2003-2021 Sam Hocevar

This software is released for free use under the terms of the GNU General Public License, version 2 or higher. NO WARRANTY IS EXPRESSED OR IMPLIED. USE THIS SOFTWARE AT YOUR OWN RISK.

CONTACT INFORMATION

See https://github.com/samhocevar/rinetd/releases for the latest release.

Thomas Boutell can be reached by email: boutell@boutell.com diff --git a/src/Makefile.am b/src/Makefile.am index 6d5dbf0..2e13f89 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,10 +14,6 @@ BUILT_SOURCES = parse.c parse.c: parse.peg if which leg >/dev/null 2>&1; then leg -o $@ $^; else touch $@; fi -# If roffit is available, regenerate index.html -index.html: rinetd.8 - if which roffit >/dev/null 2>&1; then roffit < $^ > $@; else touch $@; fi - # _POSIX_C_SOURCE is for SA_RESTART and others # _XOPEN_SOURCE is for struct sigaction # _GNU_SOURCE is for h_errno and gethostbyname-related macros