dns2tcpc(1)
π dns2tcpc(1) β the General Commands Manual glow-up π
okay bestie, sit down, grab a boba, because we're talking about dns2tcpc β and no, it's not a vibe, it's a whole tunneling tool that encapsulates TCP traffic over DNS. iykyk. π¦
β¨ NAME β¨
dns2tcpc β a tunneling tool that encapsulates TCP traffic over DNS.
πΈ SYNOPSIS πΈ
dns2tcpc [ -h ] [ -c ] [ -z domain zone ] [ -d debug_level ] [ -r
resource ] [ -k key ] [ -f config_file ] [ -e command ] [ -T request
type ] [ -l local_port ] [ server ]
π DESCRIPTION π
dns2tcpc is a network tool β a little icon, honestly β used to encapsulate TCP communications in DNS. here's the tea: when connections come in on a specific port, all that TCP traffic gets sent to the remote dns2tcpd server and then forwarded to a specific host and port. and the best part? multiple connections are supported. she's versatile, she's multitasking, she's giving main character energy. π
ngl, dns2tcpc was written for demonstration purposes. so like, she's a showcase girlie, not necessarily your production queen. keep that in mind. π
π OPTIONS π
-hβ the Help Menu. when you're lost in the group chat, she sends the menu. π«Ά-cβ Enable DNS compression. ποΈ but bestie, listen: when you use this, be sure that all relay and DNS server support compression and really use it. not optional. no cap.-zdomain zone β Use this domain as endpoint. π―-ddebug level β Change debug level. the levels available are1,2or3. pick your level of yapping. π’-rresource β Remote resource to access.-kkey β Pre shared key used for authentication (identification). π-fconfig file β Configuration file to use.-Trequest type β Request type to use. actually, onlyKEYandTXTrequests are supported. that's it, that's the list. β¨-ecommand β Command to execute, I/O are redirected in the tunnel. π§-llocal_port β Local port accepting incoming connections (or-for stdin on UNIX systems). yes, a literal dash. iconic.-tconnection timeout β Maximum DNS server's answer delay in seconds. a valid delay is between1and240seconds. Default is3. β°- server β DNS server to use. the first entry in
resolv.conffile will be chosen if the server is not specified. she'll pick for you, she's thoughtful like that. π
π CONFIGURATION FILES π
by default, ${HOME}/.dns2tcprc is used if no configuration file is specified. here's an example, feast your eyes:
domain = dns2tcp.hsc.fr
resource = ssltunnel
local_port = 4430
enable_compression = 0
debug_level = 1
key = mykey
# DNS to use
server = ns.hsc.fr
β EXAMPLES β
dns2tcpc -k mykey -z dns2tcp.hsc.fr mydns
Ask the dns2tcp server to list available resources. window shopping, basically. π
ssh -o 'ProxyCommand dns2tcpc -r ssh -l - -z dns2tcp.hsc.fr -k mykey
mydns' myserver
Use dns2tcp as a proxy command with ssh. we try to connect to the ssh resource with the key 'mykey' and the DNS mydns. it's giving tunnel, it's giving proxy, it's giving slay. π¦
dns2tcpc -r socat-resource -e '/bin/bash -i' -k mykey -z dns2tcp.hsc.fr
mydns
Use dns2tcp as a reverse shell β the remote shell will appear on the socat-resource. the remote shell will appear on the socat-resource. yes bestie, that's the whole point. π
dns2tcpc -d 1 -f /dev/null -r ssl-tunnel -l 2000 -k mykey -T KEY -z
dns2tcp.hsc.fr mydns
Do not use the default configuration file, bind local port 2000 and forward all the traffic on the remote ssl-tunnel resource, use the first debug level. Use KEY type DNS requests. maxed out customization, we love to see it. π₯
π«Ά AUTHORS π«Ά
Olivier Dembour <olivier.dembour@hsc.fr>
π₯ SEE ALSO π₯
ssltunnel
and that's the whole manual, bestie β dns2tcpc(1) from the General Commands Manual, brought to you with all the love. π stay tunneling, stay iconic, and remember: multiple connections are supported. periodt. β¨ππΈ
π¦ where this page comes from
- debian bookworm: dns2tcp 0.5.2-3 Β· GPL-2.0-or-later
- debian trixie: dns2tcp 0.5.2-3 Β· GPL-2.0-or-later
- nixos 26.05: dns2tcp 0.5.2
- nixpkgs unstable: dns2tcp 0.5.2
- ubuntu jammy: dns2tcp 0.5.2-3 Β· GPL-2.0-or-later
- ubuntu noble: dns2tcp 0.5.2-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms