TLSTUNNEL(8)
π TLSTUNNEL(8) β the system management command where we wrap TLS around your plaintext faves β¨
okay so bestie, real talk: this page is from the System Management Commands manual section, and honestly it ate. Let's get into it π«Ά
π NAME π
tlstunnel β Forward TLS/DTLS as TCP/UDP/SCTP, and vice versa. Literally the whole vibe. π
β¨ SYNOPSIS β¨
tlstunnel MODE OPTIONS [--] <pavlov_cmd>...
πΈ DESCRIPTION πΈ
so the tlstunnel command wraps TLS around connections that are otherwise plaintext. no cap, that's the whole personality. and it can even be used for protocols that do STARTTLS in the course of their protocol interactions, thanks to a simple pavlov(3) scripting facility β like, it's giving versatility π
The TLS facilities are drawn from a tlspool-daemon(8) daemon, which is contacted over a UNIX domain socket. So it inherits the architectural benefits of the TLS Pool, which highkey includes the ability of central control, strong protection of cryptographic credentials, and even the ability to monitor and control which local identities are revealed to which remote peers. icon behavior, honestly π₯
The tunnel can be built up using either TLS or DTLS, the latter of which is the datagram variety of common, stream-oriented TLS. And here's the rules, bestie, memorize them:
- When relaying a TCP connection, TLS is the only available option.
- When relaying a UDP connection, DTLS is the only available option.
- When relaying an SCTP connection, both varieties are available, but DTLS is generally preferred for efficiency reasons. π
Future versions of tlstunnel are expected to support symmetric behaviour, but the present version must run in either client or server mode. Not both. Pick a lane, girl. π
Used as a client, the service listens for plaintext connections made to address inaddr and port inport, wraps them in TLS as a client and forwards the connection to address fwaddr and port fwport. When used as a server, the same is done, however the wrapping of TLS is changed to unwrapping of TLS. yes, we're unwrapping. it's giving gift π
Addresses can take the form of a UNIX domain socket path, or host:port where the host is either a DNS name or an IPv6 address. For that last form, backward compatibility to IPv4 is possible by prefixing :: to an IPv4 address. And you can use this backward compatibility with either or both or none of inaddr and fwaddr β dealer's choice, bestie β¨
The end points authenticate, and are authorized, as configured in the system-wide TLS Pool policy settings. These settings ensure a consistent default behaviour for all TLS Pool connections. As an example, these policies tend to include requirements to certificates. so like, read your policy, ok? π
The MODE defines whether tlstunnel runs as a client or server:
-c,--clientβ Runtlstunnelas a client, meaning that it is connected to by a plaintext connection and forwarded as a TLS-wrapped variety.
Client authentication and authorization are implemented as specified in the TLS Pool configuration. This includes choice of certificates and settings about their visibility.
-s,--serverβ Runtlstunnelas a server, meaning that it is connected to by a TLS-wrapped connection and forwarded as a plaintext variety.
Client authentication and authorization are implemented as specified in the TLS Pool configuration. This includes choice of certificates and settings about their visibility.
The OPTIONS detail further information, some of which is actually not optional at all. π shocking, I know.
π OPTIONS π
-f,--forkβ When thetlstunnelstops, the TLS connections should continue to run. like, don't kill the vibe on your way out π¦-t,--tcp,--tcp-tlsβ Listen to, and forward as, TCP connection. The secure wrapping is implemented through stream-oriented TLS.
This is also the default option, selected when none of --tcp-tls, --udp-dtls, --sctp-tls or --sctp-dtls has been supplied. she's the default for a reason π
-u,--udp,--udp-dtlsβ THIS FEATURE IS NOT IMPLEMENTED. π The semantics cannot be clearly defined, because UDP has no notion of a connection, while TLS does need it to keep state. Rather than implementing guesses here and load it with configuration options such as timeouts, it is advised to implement DTLS directly in the UDP application. no cap, go do it in your app instead π-x stream,--sctp-stream-number streamβ When SCTP is used, forward the given stream number. This option may in the future be REDESIGNED to permit multiple streams, and the default is unsettled but might be all. There are a few alternative approaches. so likeβ¦ it's giving "in flux" π
Combine with one of --sctp-dtls or --sctp-tls to specify the desired form of transport layer security.
--sctp-tunneledβ Specifies that SCTP should be tunneled over UDP, using the port number9899as specified in RFC 6951. The default is to not use a tunnel, as can be specified explicitly with--sctp-not-tunneled. π§--sctp-not-tunneledβ Specifies that SCTP should not be tunneled over UDP. This is the default behaviour when--sctp-tunneledis not specified. she's the default, she's chill πΈ-l localaddr,--local-addr localaddrβ The local address for the tunnel. π-r remoteaddr,--remote-addr remoteaddrβ The remote address for the tunnel. βοΈ-L lid,--local-id lidβ Set the local identity. This should be of the form of a domain name, oruser@domainname. This paramater is required. When alocalidservice program has registered withtlspool-daemon(8)then the local identity may be passed through for filtering, depending on the option used when registering. mandatory bestie, no skipping π-R rid,--remote-id ridβ Constrain the remote identity. This should be of the form of a domain name, oruser@domainname. This parameter is optional in server mode, but is (usually) needed to setup client mode. so likeβ¦ technically optional, but good luck π-s svcname,--service svcnameβ Specify the service name that will be sent totlspool-daemon(8)during initiation of the TLS protection. This helps to decide several protocol-specifics, including whether it is safe to start with an Anonymising Precursor. The service name should follow the IANA spelling, which is also used in/etc/services. π
yes, the page literally uses-stwice β once for--serverand once for--service. not me, bestie, I just work here π
-S path,--tlspool-socket-path pathβ Override the built-in default path for the socket pool. This can be used to address a specific instance of the TLS Pool, for instance one that is run under a personal account, accessing a personally held PKCS #11 token. π-p command,--pavlov-command commandβ Specifies an alternative command in the style ofpavlov(3)to replace the builtin version. An external command will normally be less efficient than the builtin variety. trade-offs, bestie π
The remaining commandline arguments form the <pavlov_cmd>..., which are passed on to the builtin or external pavlov(3) facility. This can be used to perform communication in plaintext over the soon-to-be TLS connection; it can be used to negotiate options over a textual protocol up to the agreement to switch to TLS. This is precisely what pavlov(3) was design for β except that the next-stage protocol was PPP and not TLS. history lesson, slay π
π LIMITATIONS π
The TLS Pool can handle various options when connecting to a remote site. These options have not yet been implemented as commandline switches, so this level of refinement cannot be added when using the tlstunnel program. sad but true π
The TLS Pool usually negotiates local and remote identities as part of the authentication and authorization procedures. These procedures do not interface optimally with the TLS Tunnel, because there is no place to leave this information. What has been implemented is the mandatory -l option that sets the local identifier to use, and an optional -r option to constrain the remote identity. it's giving "we did what we could" π«Ά
Note that the TLS Tunnel does not implement a PIN entry interface; this is a function that is separately coordinated with the TLS Pool, so it can bring up a dialog in a trusted environment, making it easier to secure than any per-command PIN entry dialog. ngl that's actually kind of an upgrade π
Where TLS and even DTLS have a notion of connection state, necessary for the management of things like session keys, there is no concept of a connection for UDP transmission. For this reason, the UDP variant of this tool has not been implemented; it would involve close-to-NAT practices that can easily lead to confusion. so we simply didn't β¨
π¦ AUTHOR π¦
Written by Rick van Rein of OpenFortress.nl, for the ARPA2.net project. we stan π
π₯ REPORTING BUGS π₯
For any discussion, including about bugs, please use the TLS Pool mailing list found on http://lists.arpa2.org/mailman/listinfo/tls-pool. come chat, we don't bite π
Please read the software distribution's README, INSTALL and TODO files for information about the tlspool-daemon(8) implementation status. fr fr, read them.
π COPYRIGHT π
Copyright Β© 2015 Rick van Rein, ARPA2.net.
ARPA2 is funded from InternetWide.org, which in turns receives donations from various funding sources with an interest in a private and secure Internet that gives users control over their online presence. This particular project has been sponsored in part by NCSC. π
β SEE ALSO β
tlspool-daemon(8), tlspool_starttls(3), pavlov(3).
Online resources may be found on the project home page, http://tlspool.arpa2.net. go click, bestie π
okay that's the whole page!! this was ARPA2.net, November 2015, page TLSTUNNEL(8) β mwah, go wrap something in TLS π
β¨
π¦ where this page comes from
- nixos 26.05: tlspool 0.9.7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms