dns2tcpc(1)

πŸ“¦
version 0.5.2 Β· 2 versions
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble

πŸ’– 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.
  • -z domain zone β€” Use this domain as endpoint. 🎯
  • -d debug level β€” Change debug level. the levels available are 1, 2 or 3. pick your level of yapping. πŸ“’
  • -r resource β€” Remote resource to access.
  • -k key β€” Pre shared key used for authentication (identification). πŸ”‘
  • -f config file β€” Configuration file to use.
  • -T request type β€” Request type to use. actually, only KEY and TXT requests are supported. that's it, that's the list. ✨
  • -e command β€” Command to execute, I/O are redirected in the tunnel. 🧚
  • -l local_port β€” Local port accepting incoming connections (or - for stdin on UNIX systems). yes, a literal dash. iconic.
  • -t connection timeout β€” Maximum DNS server's answer delay in seconds. a valid delay is between 1 and 240 seconds. Default is 3. ⏰
  • server β€” DNS server to use. the first entry in resolv.conf file 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