A steady flow of features, and releases, is key to keeping any project
alive. Recently I ticked off another item in the Finit
TODO list …
Finit v1.12 now comes with a built-in inetd! You no longer need an
external inetd daemon to launch services on demand.
The good news doesn’t stop there, this little inetd actually supports a
poor man’s tcpwrappers!
inetd ssh/tcp nowait [2345] /sbin/dropbear -i -R -F
inetd ssh@eth0:222/tcp nowait [2345] /sbin/dropbear -i -R -F
With these two lines in your /etc/finit.conf
you tell finit to launch
the Dropbear SSH
server on demand on port 22 (default ssh/tcp port in /etc/services
) on
all interfaces except on eth0
, which in your case is the Internet
(WAN) interface, here you want SSH to run on port 222. Actually, you
don’t want port 22 open at all on eth0
… so finit takes care of this
for you! Seriously, it just works, no need for messing about with that
nasty old iptables
anymore!
The original UNIX inetd super server supported many protocols
internally, some of which may seem a bit odd today, and some have been
superseded by more modern protocols.
Finit currently only supports one internal/built-in standard service,
time
. It is built as a plugin to serve as an example of how you can
extend Finit yourself. The time service can be called either as UDP or
TCP. To prevent security issues, the time
protocol is disabled by
default. To enable it you need two things:
- The
time.so
plugin (built by default)
- An
inetd time ...
line in /etc/finit.conf
Assuming you’ve installed the default set of plugins, the following two
lines can be added:
inetd time/udp wait [2345] internal
inetd time/tcp nowait [2345] internal
This can be very useful for testing the inetd capabilities, your network
connection, or simply to get the time to a client where NTP for some
reason does not work, or is blocked. For instance, you could have a GPS
setup on your server and distribute time to clients with the time
protocol.
To use it you need an rdate
client. Users of rdate
in BusyBox may need to be reminded that it
only supports TCP.
$ rdate -pu 198.51.100.42
Sat Mar 7 08:48:58 CET 2015
For more info on Finit and its features, see the README.
Enjoy! ツ
[Read More]