Dns2tcp relays TCP connections over DNS queries and responses. A server authoritative for a domain exposes configured “resources” (for example an SSH or SSL endpoint), and a client resolves a chosen resource through any DNS server that can reach it, which allows traffic out through networks that only permit DNS.
Starts the dns2tcpd server using ~/.dns2tcprc-style configuration (domain, key and resources such as ssh:127.0.0.1:22).
dns2tcpd -F -d 1
Connects to a named resource on the server and exposes it as a local TCP port, tunneled through DNS queries to the given domain.
dns2tcpc -r <RESOURCE> -l <LOCAL_PORT> -k <KEY> -z <TUNNEL_DOMAIN> <DNS_SERVER>