Skip to content

If you have ever opened an OpenVPN configuration or a VPN app's advanced settings, you have probably met a choice between UDP and TCP. It looks like a minor technical switch, yet it decides how your tunnel behaves when Wi-Fi is patchy, when a hotel firewall is strict, or when a video call starts to stutter. The question "OpenVPN TCP vs UDP: which is better?" has a short answer and a useful long one. The short answer is that UDP is the better default and TCP is the better fallback. The long answer is what the rest of this article covers.

We will look at what each transport does, why stacking TCP on top of TCP can hurt, which ports are involved, and how to test both on your own network in about fifteen minutes. We will not rehash the basics of tunnels and ciphers, because those are covered in what a VPN protocol is and in the broader WireGuard vs OpenVPN comparison. Here we stay on one question: what changes when OpenVPN's outer wrapper is TCP instead of UDP.

What the transport layer does for a tunnel

Every VPN tunnel has to put its encrypted packets inside something that the internet can deliver. Underneath, the internet moves IP packets, and on top of IP there are two common transport choices.

UDP (User Datagram Protocol) sends each packet and moves on. It does not number packets for delivery guarantees, does not wait for acknowledgements and does not resend anything by itself. If a packet is lost, UDP does not notice.

TCP (Transmission Control Protocol) builds a reliable, ordered stream. It numbers the data, expects acknowledgements, resends what was lost and slows down when it sees congestion. If a packet is lost, TCP holds back everything behind it until the gap is filled.

OpenVPN can use either one as the outer layer for its encrypted tunnel. The tunnel's contents are protected in the same way in both cases. A mode switch from UDP to TCP does not make the cipher stronger or weaker. It only changes how the already-encrypted packets are carried between your device and the VPN server.

A useful mental picture is a delivery service. UDP is a courier who drops each parcel at the door and leaves; if one parcel falls off the van, nobody tells him. TCP is a courier who gets a signature for every parcel, goes back when one is missing and refuses to deliver parcel number 7 before parcel number 6. TCP gives certainty, and certainty costs waiting time.

Why UDP is the default for tunnels

The reason UDP is usually preferred comes down to what is already inside the tunnel. Most of what you send through a VPN is itself TCP traffic: web pages, app APIs, downloads, secure browsing. Those inner connections already have their own acknowledgements, resends and congestion control. They also have the right to decide what to do about loss, because they know what the application needs.

When the tunnel is UDP, a lost outer packet simply means a lost inner packet. The inner TCP connection notices, resends that one segment and slows down a little. One layer handles the problem, and it is the layer that understands the data.

Other benefits follow:

  • Lower and steadier delay. There is no extra waiting for outer-layer acknowledgements. This matters for calls, games and remote desktops, where one late packet is better skipped than waited for. If you care about this side, does a VPN reduce ping goes through latency, jitter and packet loss in detail.
  • Easier roaming. UDP has no connection to tear down. When your phone switches from Wi-Fi to mobile data, a UDP-based tunnel can often resume quickly after a short pause.
  • Lower overhead. UDP headers are small and add no connection state to keep alive.
  • Natural fit for real-time traffic. QUIC, the transport behind modern web protocols, is itself built on UDP for related reasons (see RFC 9000).

None of this means UDP is magic. Some networks drop or rate-limit UDP, and some firewalls allow only a short list of outbound ports. That is the situation in which TCP earns its place.

TCP over TCP: the stacking problem

Running a TCP tunnel carrying TCP connections is commonly called "TCP over TCP", and it is the main reason people warn against OpenVPN's TCP mode. The problem is subtle, so here is a worked example.

Suppose you are downloading a file through a TCP-mode tunnel on a Wi-Fi network that loses about 3 packets in 100. Follow what happens when one outer packet disappears.

  1. The outer TCP connection notices the loss. Its timer starts and it holds back every later outer packet until the missing one has been resent. This delay might be a few hundred milliseconds if the connection has been unstable.
  2. While the outer layer is waiting, the inner connection, the one carrying your download, sees nothing arrive. Its acknowledgements stop coming back.
  3. The inner connection's own timer expires. It decides the segment was lost and resends it, and it also reduces its sending speed because it assumes the network is congested.
  4. Meanwhile the outer layer recovers, delivers the held packets and then the resent inner segment arrives as well. The inner connection now has duplicate data and has already slowed down.
  5. If this repeats, both layers keep shrinking their windows and stacking their timers. Throughput can fall much further than the loss rate alone would suggest, and the connection can feel frozen for seconds, then burst.

This is sometimes called a "TCP meltdown". It is rare on a good connection, where almost no packets are lost and the two layers never disagree. It becomes visible on mobile networks, crowded Wi-Fi and long-distance links. That is why OpenVPN's own documentation presents UDP as the preferred mode and TCP as the option for networks that leave you no alternative.

Note that the problem is not that TCP is bad. It is that two independent recovery systems are trying to solve the same problem at the same time, and they do not coordinate.

Ports and networks: where TCP helps

The practical side is often about ports rather than performance. A port is the numbered door a service uses. OpenVPN's officially assigned default port is 1194, and with UDP that is the standard pairing. You will also see OpenVPN offered on TCP port 443, the same port used by ordinary secure websites.

Why does that matter? Some networks, including certain offices, schools, hotels and public hotspots, allow outbound connections only on a short list of ports, usually 80 and 443, and drop everything else. A UDP tunnel on port 1194 may then fail at the very first packet, while a TCP tunnel on port 443 passes because the network treats it like regular secure browsing.

Two cautions belong here:

  • Respect the rules of the network you are on. Networks that restrict ports usually do it for a reason, such as security policy at an employer. If you are on a work or school network, ask whether using a VPN is allowed before you try. This article is about compatibility, not about defeating anyone's controls.
  • Port 443 is not a disguise. Some inspection systems can recognise a VPN tunnel regardless of the port number. Changing ports solves "my connection never starts on this hotel network" more often than it solves anything else, and it does not make traffic invisible.

In day-to-day terms, TCP is the compatibility option. If UDP works on your network, there is rarely a reason to leave it.

Side-by-side comparison

Point UDP mode TCP mode
Typical default port 1194 443 or 1194 (varies by setup)
Reliability layer None outside; inner traffic handles loss Outer TCP resends lost packets
Delay on a clean network Low Slightly higher
Behaviour on a lossy network Degrades gently Can stall or burst (TCP over TCP)
Roaming between networks Usually resumes quickly Connection must be rebuilt
Passes strict port filters Sometimes blocked Often allowed on port 443
Best for Calls, games, mobile, general use Networks that block UDP
Strength of encryption Same Same

If you read only one row, read the last one. The encryption is identical, so security is not the reason to pick either mode.

How to test both on your own network

Skip the guessing and measure. This takes about fifteen minutes and gives you a result for the networks you actually use. These steps assume your VPN app or client exposes a transport setting; if it does not, or if you are unsure, keep the default and contact support instead.

  1. Write down a baseline without the VPN. Run a speed test and a ping to a well-known host. Note the download speed, upload speed and ping.
  2. Connect with the default setting and repeat. Record the same three numbers. Note whether anything feels different when you load a page or start a video.
  3. Switch only the transport (UDP to TCP, or the reverse) and reconnect to the same location. Changing the location at the same time would spoil the comparison.
  4. Repeat the three measurements and add one more: run a ping for a full minute and look at the spikes. In TCP mode on a lossy network, you may see long spikes after quiet periods.
  5. Try a realistic task. Join a short video call, or open a remote desktop session, in each mode. Real usage reveals stutter that averages hide.
  6. Test on a second network such as mobile data. Results on your home fibre may differ from those at a cafe or on a train.
  7. Keep the result. Note which mode worked best on which network, so you do not need to repeat the experiment.

A few pointers for reading the numbers. Compare ping spikes, not just averages: latency is about the time a packet takes, and jitter is how much that time varies. A mode that is slightly faster in a download test but spikes every few seconds will feel worse for calls. Also remember that a slow result may have nothing to do with the transport. Why a VPN is slow lists the other usual causes, from a distant server to a congested Wi-Fi channel.

Scenarios: which mode fits which person

A traveller on hotel Wi-Fi. Lena arrives at a hotel where the lobby network lets browsing work but the VPN never leaves the "connecting" state. UDP packets appear to be filtered. Switching to TCP on port 443 completes the connection. Video calls are a little less smooth than at home, but email and messaging work, which was the aim. If the hotel's mobile signal is good, using mobile data is another option; our guide on using a VPN on hotel Wi-Fi covers the wider picture.

A remote worker on home fibre. Somchai works over a remote desktop session all day. Every extra delay of 50 milliseconds is noticeable as lag when typing. UDP gives him the steady, low delay he needs, and he has never had a reason to touch the setting.

A student on a crowded campus network. Wei's laptop drops about one packet in twenty at lecture time because hundreds of devices share the access point. TCP mode causes bursty, stalling downloads. UDP degrades more smoothly. If campus rules block UDP, she asks IT whether a VPN is allowed rather than guessing.

A family on a stable home router. The Tan family uses a VPN on phones and a laptop at home. The network is clean, the app default works and nobody notices any difference. The right decision is to leave everything as it is.

Common mistakes and limits

  • Switching to TCP "for security". The encryption does not change, so you gain nothing and may lose speed.
  • Changing several settings at once. If you change transport, location and app at the same time, you cannot tell which one made the difference.
  • Treating port 443 as invisibility. It improves compatibility on some networks. It does not conceal that a tunnel exists.
  • Ignoring MTU. Oversized packets get fragmented or dropped on some paths, which looks like stalling on large downloads and fine behaviour on small pages. This is covered by path MTU discovery (RFC 1191), and VPN software commonly reduces the packet size to leave room for tunnel overhead. If big transfers freeze while small pages load, tell support rather than editing values blindly.
  • Blaming the transport for everything. A weak signal, an overloaded server or a poor Wi-Fi channel can cause the same symptoms. Work through improving VPN connection stability before you conclude the mode is at fault.
  • Forgetting that the choice is only for protocols that offer it. WireGuard uses UDP only, so there is nothing to select. IKEv2 also works over UDP. The TCP-versus-UDP question belongs mainly to OpenVPN.

If a connection fails to start at all, the transport is one cause among several. The checklist in VPN not connecting puts them in order, from typing the credentials correctly to checking the clock on your device.

Summary

OpenVPN carries the same encrypted tunnel over either UDP or TCP, so neither is more secure than the other. UDP is the better default because it lets the traffic inside the tunnel handle its own loss and keeps delay low, especially on mobile and shared Wi-Fi. TCP mode suffers from TCP-over-TCP stacking when packets are lost, but it is a useful fallback on networks that only permit a short list of outbound ports. Keep the default, change one setting at a time, measure with real tasks, and always follow the rules of the network you are on.

If you want a simple way to try a VPN on your own networks, the pricing page shows the available pass lengths, and the download page links the free app.

Frequently asked questions

Is OpenVPN faster over TCP or UDP?

On a clean connection UDP is usually a little faster and reacts better to changes. On a lossy connection, TCP mode can fall behind sharply because the tunnel and the traffic inside it both try to repair the same lost packets. Test on your own network rather than trusting a general rule.

Is OpenVPN over TCP more secure than over UDP?

No. The encryption and authentication of the tunnel are the same in both modes. The choice changes how packets are carried and how the tunnel behaves under loss or on restrictive networks, not how strong the encryption is.

Why do some guides recommend TCP port 443?

Many networks allow outbound traffic on the same port used by ordinary secure websites and block most others. A TCP tunnel on that port may connect where UDP does not. It is a compatibility measure for networks you are allowed to use, not a way to defeat rules you have been given.

Should I change the setting if my VPN app offers it?

Only if you have a reason. Keep the app's default, and change it when you have a specific symptom such as a connection that never completes on one network. Change one thing at a time and note the result.

Does the choice matter for WireGuard?

WireGuard runs over UDP only, so there is no TCP or UDP setting to choose. The trade-offs in this article concern OpenVPN and any other design that can run on either transport.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a VPN for a short trip or a busy month?

XPASS sells prepaid passes for a set number of days. You pay once and nothing renews automatically.

See passes

Keep reading

VPN Security

WireGuard vs OpenVPN Explained

WireGuard and OpenVPN both build encrypted tunnels, but they differ in design, complexity and flexibility. Here is a plain comparison and how to think about the choice.

9 min read

VPN Basics

What Is a VPN Protocol?

A VPN protocol sets the rules for how your device and a VPN server connect and protect traffic. Here is what that means in plain language, with the main trade-offs.

9 min read

Troubleshooting

Why Is My VPN So Slow? How to Speed It Up

A practical checklist for a slow VPN: measure first, rule out your own network, then fix Wi-Fi, background apps, device settings and streaming buffering one step at a time.

7 min read

Troubleshooting

How to Improve VPN Connection Stability

A VPN that keeps dropping or stalling is usually reacting to the network or device around it. These steps help you find and fix the weak link.

5 min read

Troubleshooting

VPN Not Connecting? Step-by-Step Fixes

A clear order of checks for when the VPN will not connect: pass status, login details, Wi-Fi and mobile data, permissions, firewalls, app conflicts and error messages.

8 min read