udpsvd(8)

✨ NAME ✨

udpsvd β€” the UDP/IP service daemon, section 8 of your system manager's manual, bestie πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

udpsvd [-hpvv] [-u user] [-l name] [-i dir|-x cdb] [-t sec] host port prog

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: udpsvd makes a UDP/IP socket, binds it to the address host:port, and then just... sits there. listening. main character energy πŸ‘‘ waiting for incoming datagrams to show up.

the second a datagram lands on the socket, udpsvd conditionally starts a program β€” and the vibe is: standard input reads from the socket, standard output gets redirected to standard error, and that program handles this datagram, and possibly more of them too. 🫢

BUT. and this is the important part, no cap β€” udpsvd will not start the program if another program it started earlier is still running. one at a time, bestie, we're not chaotic here. πŸ’… once the program exits, udpsvd goes right back to listening on the socket until a new datagram appears. and if there are still datagrams chilling on the socket? the program gets restarted immediately. instant. iconic. ⚑

also, udpsvd can optionally check for special instructions that depend on the IP address or hostname of the client sending the datagram β€” specifically datagrams that haven't been handled by a running program yet. the deets live in ipsvd-instruct(5), go read it iykyk πŸ“–

🚨 ATTENTION: 🚨

so here's the thing, and you need to hear it: UDP is a connectionless protocol. most programs that handle user datagrams β€” think talkd(8) β€” just keep running after they get a datagram, and they process subsequent datagrams sent to the socket until a timeout is reached. udpsvd only checks special instructions for a datagram that causes a startup of the program; it does not check them if a program handling datagrams is already running. so honestly? it doesn't make much sense to restrict access through special instructions when you're using a program like that. πŸ™ˆ

on the other hand β€” it makes perfectly good sense with programs like tftpd(8), which fork to establish a separate connection to the client when they receive the datagram. and in general, it's adequate to set up special instructions for programs that support being run by tcpwrapper. slay. πŸ’…


🌸 OPTIONS 🌸

  • host β€” host is either a hostname, or a dotted-decimal IP address, or 0. if host is 0, udpsvd accepts datagrams to any local IP address. 🌈
  • port β€” udpsvd accepts datagrams to host:port. port may be a name from /etc/services or a number. πŸ”’
  • prog β€” prog consists of one or more arguments. udpsvd normally runs prog to handle a datagram β€” and possibly more β€” that's sent to the socket, but only if there's no program that udpsvd started earlier still running and handling datagrams. πŸ‘‘
  • -i dir β€” read instructions for handling new connections from the instructions directory dir. see ipsvd-instruct(5) for details. πŸ“‚
  • -x cdb β€” read instructions for handling new connections from the constant database cdb. the constant database normally is created from an instructions directory by running ipsvd-cdb(8). πŸ—„οΈ
  • -t sec β€” timeout. this option only takes effect if the -i option is given. while checking the instructions directory, check the time of last access of the file that matches the client's address or hostname, if any; discard and remove the file if it wasn't accessed within the last sec seconds. udpsvd does not discard or remove a file if the user's write permission is not set β€” for those files the timeout is disabled. default is 0, which means the timeout is disabled. ⏰
  • -l name β€” local hostname. do not look up the local hostname in DNS, but use name as hostname instead. by default udpsvd looks up the local hostname once at startup. 🏠
  • -u [:]user[:group] β€” drop permissions. set uid and gid to the user's uid and gid, as found in /etc/passwd, before running prog. if user is followed by a colon and a group, set the gid to group's gid, as found in /etc/group, instead of user's gid. if group consists of a colon-separated list of group names, set the group ids of all listed groups. if user is prefixed with a colon, the user and all group arguments are interpreted as uid and gids respectively, and not looked up in the password or group file. all supplementary groups are removed. πŸ’€
  • -h β€” look up the client's hostname in DNS. πŸ”
  • -p β€” paranoid. after looking up the client's hostname in DNS, look up the IP addresses in DNS for that hostname, and forget the hostname if none of the addresses match the client's IP address. you should set this option if you use hostname based instructions. the -p option implies the -h option. πŸ•΅οΈβ™€οΈ
  • -v β€” verbose. print verbose messages to standard output. πŸ—£οΈ
  • -vv β€” more verbose. print more verbose messages to standard output. πŸ“’

πŸ’œ SEE ALSO πŸ’œ

ipsvd(7), tcpsvd(8), sslsvd(8), ipsvd-instruct(5), ipsvd-cdb(8)

http://smarden.org/ipsvd/


🌟 AUTHOR 🌟

Gerrit Pape <pape@smarden.org>


okay bestie that's the whole page, periodt πŸ’– this was pulled straight from the System Manager's Manual entry for udpsvd(8) β€” so if you ever forget where it came from, just know it's the section 8 udpsvd page, living its best life in the manual. go forth and serve those datagrams, you've got this πŸ¦‹βœ¨πŸŽ€