大网数据广告活动
服务器运维问答

How does TCP over UDP get return packets

· 52CE 我爱测

How does a server send packets back to the client if there is only a UDP connection, when the client is behind a firewall, and UDP by definition does not maintain a stateful connection. If I had a better mental model of this, the…

问题原文

原帖链接 · WiringHarness · CC BY-SA 4.0

How does a server send packets back to the client if there is only a UDP connection, when the client is behind a firewall, and UDP by definition does not maintain a stateful connection. If I had a better mental model of this, then I would be better able to diagnose any firewall problems that are preventing the success of this openvpn connection.

The particular problem is my co-worker's openvpn configuration works fine except from within his home LAN, where there is no response from the openvpn server I'm trying to diagnose any problems with his router/nat/firewall, but it would be better if I understood how it's even possible for the server to respond. The OpenVPN server is configured for UDP, which is the recommended configuration.

已采纳解答

原帖链接 · Steffen Ullrich · CC BY-SA 4.0

UDP by definition does not maintain a stateful connection

While UDP is a stateless protocol it does not mean that the firewall will not maintain some kind of state in order to allow responses back to the client. In fact, this is what stateful firewalls do, NAT routers do etc. A UDP state simple consists of source and destination IP+port and the state gets removed after some inactivity (i.e. no new packets matching the state for some time).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-03-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。