mirror of
https://github.com/troglobit/finit.git
synced 2026-11-07 16:01:08 +00:00
Add support for a deny filter syntax to inetd services
This patch changes the syntax for custom inetd services and adds support
for deny filters. The new syntax is:
inetd service/proto[@iface,!iface,...] </path/to/cmd | internal[.service]>
This means the second column now defines what@from and the third to/what
process. For internal services on a custom port the internal.service
syntax must be specified, so Finit can properly bind the inetd service
to the correct plugin. Here follows a few examples:
inetd time/udp wait [2345] internal -- UNIX rdate service
inetd time/tcp nowait [2345] internal -- UNIX rdate service
inetd 3737/tcp nowait [2345] internal.time -- UNIX rdate service
inetd telnet/tcp@*,!eth1,!eth0, nowait [2345] /sbin/telnetd -i -F -- Telnet service
inetd 2323/tcp@eth1,eth2,eth0 nowait [2345] /sbin/telnetd -i -F -- Telnet service
inetd 222/tcp@eth0 nowait [2345] /sbin/dropbear -i -R -F -- SSH service
inetd ssh/tcp@*,!eth0 nowait [2345] /sbin/dropbear -i -R -F -- SSH service
Access to telnet on port `2323` is only possible from interfaces `eth0`,
`eth1` and `eth2`. The standard telnet port (`23`) is available from
all other interfaces, but also `eth2`. The `*` notation used in the ssh
stanza means *any* interface, however, here `eth0` is not allowed.
NOTE: This patch breaks syntax compatibility with Finit v1.12!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b0c759e518
commit
03573b41ca
7 files changed
+177
-195
No files matched your search
@@ -59,17 +59,6 @@ to achieve compatibility would be to add a plugin to finit which reads
|
||||
Inetd
|
||||
-----
|
||||
|
||||
wkz says we need deny rules and better syntax! we agrees
|
||||
|
||||
|
||||
wkz --> inetd telnet/tcp @!eth0
|
||||
wkz --> inetd 2323/tcp @eth0
|
||||
wkz --> 77/udp wait [2345] @finit/time
|
||||
|
||||
jnn --> telnet@eth0,eth1/tcp
|
||||
jnn --> 2323@eth2/tcp
|
||||
jnn --> 3000/udp wait [2345] time/internal
|
||||
|
||||
Optimize interface filtering by using socket filter. The functions
|
||||
`inet_*_peek()` and `inetd_is_allowed()` used for interace filtering
|
||||
should be possible to rewrite as socket filters.
|
||||
|
||||
Reference in new issue
Block a user