TCPDMATCH(8)

๐Ÿ“ฆ
version 7.6.q ยท 3 versions
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ TCPDMATCH(8) โœจ

okay bestie, welcome to TCPDMATCH(8) โ€” a page from the System Manager's Manual, and honestly? it's giving "crystal ball but for your firewall" ๐Ÿ”ฎ


๐Ÿ’– NAME ๐Ÿ’–

tcpdmatch โ€” the tcp wrapper oracle ๐Ÿงš


๐ŸŒธ SYNOPSIS ๐ŸŒธ

tcpdmatch [-d] [-i inet_conf] daemon client
tcpdmatch [-d] [-i inet_conf] daemon[@server] [user@]client

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the vibe: tcpdmatch predicts how the tcp wrapper would handle one specific request for service. like, it's not doing the thing, it's telling you what would happen. examples are down below in EXAMPLES, no worries.

The program goes and examines the tcpd access control tables โ€” default /etc/hosts.allow and /etc/hosts.deny โ€” and then prints its conclusion. and for maximal accuracy?? it also pulls extra info out of your inetd network configuration file. maximal accuracy, we love to see it.

When tcpdmatch finds a match in the access control tables, it identifies the matched rule. AND on top of that, it displays the optional shell commands or options in a pretty-printed format โ€” which makes it way easier for you to spot any discrepancies between what you want and what the program understands. iconic behaviour honestly ๐Ÿ’…


๐ŸŽ€ ARGUMENTS ๐ŸŽ€

These next two are always required, no skipping, periodt:

  • daemon โ€” a daemon process name. typically it's the last component of a daemon executable pathname.
  • client โ€” a host name or network address, or one of the unknown or paranoid wildcard patterns.
    • When you specify a client host name, tcpdmatch gives you a prediction for each address listed for that client. (yes, each one. it does the work so you don't have to ๐Ÿซถ)
    • When you specify a client address, tcpdmatch predicts what tcpd would do when client name lookup fails.

Now the optional info you can pass with the daemon@server form:

  • server โ€” a host name or network address, or one of the unknown or paranoid wildcard patterns. The default server name is unknown.

And the optional info you can pass with the user@client form:

  • user โ€” a client user identifier. typically a login name or a numeric userid. The default user name is unknown.

โœจ OPTIONS โœจ

  • -d โ€” examine hosts.allow and hosts.deny files in the current directory instead of the default ones. (local files only, bestie, it's not gonna go snooping in /etc ๐Ÿ’€)
  • -i inet_conf โ€” specify this option when tcpdmatch is unable to find your inetd.conf network configuration file, or when you suspect that the program uses the wrong one. like handing your friend the aux cord because they keep picking the wrong song ๐ŸŽง

๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

Wanna predict how tcpd would handle a telnet request from the local system? say less:

tcpdmatch in.telnetd localhost

Same request, but pretending that hostname lookup failed:

tcpdmatch in.telnetd 127.0.0.1

And to predict what tcpd would do when the client name does not match the client address:

tcpdmatch in.telnetd paranoid
heads up bestie: on some systems, daemon names have no in. prefix, or tcpdmatch may need some help to locate the inetd configuration file. so if it's acting confused, that's why. ๐Ÿ™ˆ

๐Ÿ“ FILES ๐Ÿ“

The default locations of the tcpd access control tables are:

/etc/hosts.allow
/etc/hosts.deny

๐ŸŒˆ SEE ALSO ๐ŸŒˆ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Wietse Venema (wietse@wzv.win.tue.nl), Department of Mathematics and Computing Science, Eindhoven University of Technology Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands


and that's the whole page, bestie!! ๐Ÿ’– this was from TCPDMATCH(8) in the System Manager's Manual โ€” go forth and predict your tcp wrapper's decisions with main character energy ๐Ÿฆ‹โœจ๐Ÿ’