How DNS works
When you open a website, your device asks the network's DNS server (the resolver): "what is the address of this name?" The resolver does not know the answer itself. It works its way to the server responsible for that domain, the authoritative server, passes the question on to it and returns the answer to the device.
What matters here is that a question about any name inside a domain ends up at that domain's authoritative server, and its answer goes back to whoever asked.
How the tunnel is built
It takes a domain and a server set up as authoritative for it. Everything else rests on two techniques:
- Data from the client is encoded in the name being asked about: instead of
www.example.comthe query is for a long name of letters and digits inside the tunnel's domain. The resolver dutifully passes that question to the authoritative server. - Data to the client comes back in the answer, usually in a TXT record, which can hold arbitrary text.
The client keeps asking, the server keeps answering, and both sides assemble an ordinary data stream from these small pieces. Encryption and delivery control run on top of it: DNS queries themselves can be lost or arrive out of order.
Why it is slow
- Short names. A DNS name is at most 253 characters, and each of its parts at most 63. One query holds about a hundred bytes of payload.
- Small answers. An answer over UDP is usually limited to about one to one and a half kilobytes.
- Overhead. Binary data has to be written as letters and digits, which makes it larger.
- Resolver limits. Resolvers may limit the rate of queries, and they add delay of their own.
The resulting speed is tens to hundreds of kilobits per second. That is enough for messaging, email and simple pages, but not for video.
Known implementations
- iodine, one of the first popular programs (2006): it carries IP packets and creates a network interface, like a classic VPN.
- dnscat2, a tool for network security testing.
- dnstt (2020), a modern implementation with encryption that works not only over ordinary DNS but also over DNS over HTTPS and TLS.
Where it is used and what limits it
A DNS tunnel is a reserve channel: it is useful when DNS is the only network service that works reliably. It is the slowest way to connect used in VPNs, and it is never the main one.
The technique has another side: malware uses the same method to try to move data out of corporate networks unnoticed. Security teams therefore watch for unusually large numbers of DNS queries, and network administrators are entitled to restrict such traffic. Use a DNS tunnel only on networks whose rules allow it.
The DNS tunnel in StayReady
In StayReady the DNS tunnel is one of the transports for VLESS in the apps for Windows, macOS, Linux and Android. It is a reserve for staying in touch when the other ways to connect are unstable, and it is noticeably slower than they are. Usually you choose it by hand in the settings, under Connection protocol. The apps are on the download page.
Common questions
What is a DNS tunnel in simple terms?
A way to carry data inside the queries and answers of DNS, the service that turns site names into addresses. The data is placed in the name being asked about and in the text of the answer.
How fast is a DNS tunnel?
Usually tens to hundreds of kilobits per second. That is enough for messengers and email, but too little for video and large files.
Is a DNS tunnel secure?
DNS queries themselves are not encrypted, so modern implementations encrypt the data inside the tunnel. The content is then protected, although the network can see that there are many queries.
How does a DNS tunnel differ from DNS over HTTPS (DoH)?
DoH encrypts ordinary DNS queries so that outsiders cannot see them. A DNS tunnel uses DNS queries as a transport for other data. They are different technologies.
Does StayReady have a DNS tunnel?
Yes, as a reserve transport for VLESS in the apps for Windows, macOS, Linux and Android. Usually it is chosen by hand. Download StayReady.
Updated: November 15, 2026