3 ms·
Fascinating. So then how to VPN's work performantly? I'd always assumed my VPN implemented TCP and UDP over a TCP connection. Do they not? Is the VPN connecti
by crazygringo 6y ago
Fascinating.
So then how to VPN's work performantly?
I'd always assumed my VPN implemented TCP and UDP over a TCP connection. Do they not? Is the VPN connection actually just UDP?
- aloknnikhil 6y agoVPNs are almost always over UDP. See IPSec (most common VPN implementation): https://www.cloudflare.com/learning/network-layer/what-is-ipsec/ https://www.cloudflare.com/learning/network-layer/what-is-ip... See Wireguard (increasing popularity): https://www.wireguard.com/ https://www.wireguard.com/
- xav0989 6y agoDoesn't IPSec operate at the same level as TCP/UDP? TCP is protocol 6, UDP protocol 17; while IPsec uses protocol 50 for ESP (encrypted) and 51 for AH (authenticated).
- amaccuish 6y agoIPSEC can operate in both modes, either as a pure IP protocol or in "nat traversal" mode, over IIRC udp 500 and 4500
- xorcist 6y agoIPsec is really an IP protocol, just like UDP and TCP is. For pragmatic reasons (firewalls, NAT, that sort of thing) it is nowadays mostly tunneled over UDP.
- lxgr 6y agoMost of them can use either, although TCP gets you terrible performance for the reasons mentioned in the article. Modern VPNs will usually attempt UDP first, falling back to TCP only if that does not work; unfortunately, OpenVPN doesn't seem to have that option and requires manual configuration in my experience. This means that many sysadmins configure it to use TCP for the higher success rate in most environments. IPsec is UDP only, as is Wireguard.
- xav0989 6y agoIPsec isn't UDP though. It use UDP for the key exchange, but the actual IPsec traffic uses ESP or AH, which are IP protocols at the same level as TCP, UDP, or ICMP. (ignoring IPSec NAT-T)
- lxgr 6y agoTrue, but NAT-T is almost a given if one of the endpoints is a laptop or mobile device these days. Also, UDP and ESP can almost be used interchangeably for this discussion (flow control, congestion control, segmentation etc. or a lack thereof).