# Install dns2tcp with Homebrew, apt, MacPorts, Nix

TCP over DNS tunnel. Version 0.5.2 via Homebrew; verified from local package data. Also installable with debian: sudo apt install dns2tcp.

## Install

```sh
sudo av install brew:dns2tcp
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install dns2tcp
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dns2tcp
```

  Evidence: MacPorts ports tree: net/dns2tcp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install dns2tcp
```

  Evidence: Debian stable package indexes: dns2tcp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#dns2tcp
```

  Evidence: nixpkgs package indexes: pkgs/by-name/dn/dns2tcp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:dns2tcp
- **Package manager:** Homebrew
- **Version:** 0.5.2
- **Source summary:** TCP over DNS tunnel
- **Homepage:** <https://packages.debian.org/sid/dns2tcp>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- dns2tcpc (alias)
- dns2tcpd (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.5.2
## Project history and usage

dns2tcp is a client/server tool for relaying TCP connections over DNS. It belongs to the older family of DNS-tunneling utilities used for constrained networks, demonstrations, and security testing rather than general-purpose VPN service.

### Project history

The upstream ChangeLog marks version 0.3 as the public release and records later fixes for 64-bit architectures, DNS decoding, privilege dropping, client authentication, and Windows client support. The README is explicit that DNS encapsulation is not encrypted and should be treated as an insecure transport.

### Adoption history

dns2tcp stayed visible because it solves one very specific network problem with small C tools: a client, a server, and simple resource mappings. Distribution packaging kept it available for administrators and security testers who need a TCP-over-DNS tunnel without a broader VPN stack.

### How it is used

The README shows using dns2tcpc to list available remote resources, bind a local port to a remote service, or run from ~/.dns2tcprc. Server use centers on ~/.dns2tcpdrc, where the operator defines the DNS domain, key, and named resources such as ssh or smtp targets.

### Why package nerds care

Package nerds care about dns2tcp because it is a classic small-network-tool package: narrow, risky if misunderstood, but valuable in labs and incident-response toolboxes because it demonstrates TCP-over-DNS behavior with minimal moving parts.

### Timeline

- 0.3: Public release.
- 0.4: 64-bit architectures start working.
- 0.5: Client authentication, Windows client support, and proxy-style use are added.
- 0.5.2: OpenSSL includes are removed after earlier library cleanup.

### Related projects

- iodine is a related DNS-tunneling project focused on IP-over-DNS rather than TCP-over-DNS.
- ssh ProxyCommand workflows are a common adjacent use case for dns2tcpc.

### Sources

- <https://github.com/alex-sector/dns2tcp>
- <https://raw.githubusercontent.com/alex-sector/dns2tcp/master/README>
- <https://raw.githubusercontent.com/alex-sector/dns2tcp/master/ChangeLog>
- <https://packages.debian.org/stable/net/dns2tcp>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.dns2tcprc, ~/.dns2tcpdrc

## Credential files

- Unix: ~/.dns2tcprc, ~/.dns2tcpdrc
## Other Package-Manager Records

- Debian apt - dns2tcp - 0.5.2-3: normalized package name match | Debian stable package indexes: dns2tcp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | TCP-over-DNS tunnel server and client | http://www.hsc.fr/ressources/outils/dns2tcp/
- Nix - dns2tcp: normalized package name match | nixpkgs package indexes: pkgs/by-name/dn/dns2tcp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - dns2tcp - 0.5.2-3: normalized package name match | Ubuntu 24.04 LTS package indexes: dns2tcp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | TCP-over-DNS tunnel server and client | http://www.hsc.fr/ressources/outils/dns2tcp/
- MacPorts - dns2tcp: normalized package name match | MacPorts ports tree: net/dns2tcp/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/dns2tcp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dns2tcp.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
