.. /Dns2tcp
Star

Access

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.

Paths:

Resources:

Detections:

Access

  1. Starts the dns2tcpd server using ~/.dns2tcprc-style configuration (domain, key and resources such as ssh:127.0.0.1:22).

    dns2tcpd -F -d 1
    Use case
    Operator side of a DNS tunnel exposing an internal service.
    Privileges required
    Administrator/root
    Operating systems
    Linux, MacOS, BSD
  2. 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>
    Use case
    Reaching an internal service (SSH, a web shell, etc.) over DNS from a network that blocks other outbound protocols.
    Privileges required
    User
    Operating systems
    Windows, Linux, MacOS