25 ms·
> Eventually we may also want to enable inbound UDP to port 443, so that people can run web servers that support HTTP/3. Apropos inbound traffic, what is the a
by xg15 5y ago
> Eventually we may also want to enable inbound UDP to port 443, so that people can run web servers that support HTTP/3.
Apropos inbound traffic, what is the approach regarding inbound replies?
As in: Even if you do an outbound request, you usually expext an acknowledgement or reply from the server, which constitutes inbound traffic.
With TCP, firewalls can distinguish between unprompted inbound packets and replies by tracking which TCP connection the packet belongs to. This is possible because TCP packets contain unencrypted connection information that can be read by firewalls.
With generic UDP, there is no reliable connection information, so firewalls have to rely on heuristics like hole punching [1] - which are less precise and suboptimal from a security perspective.
I believe QUIC has connection information, however it's encrypted, so it's not accessible to firewalls. So does that mean, the future is hole punching everywhere, or was this changed so the connection info is now public?
[1] https://en.m.wikipedia.org/wiki/Hole_punching_(networking) https://en.m.wikipedia.org/wiki/Hole_punching_(networking)
- jlokier 5y agoNAT and stateful packet inspection (SPI) work with UDP similar to how they do with TCP, but depend a little more on heuristic timeouts because there is nothing equivalent to TCP flags. Outbound packet 4-tuples (source IP, destination IP, source port,, destination port) are tracked and translated with NAT. For some heuristic amount of time after, if an incoming UDP packet is received matching the same 4-tuple it is let through and the translation is reversed. This is UDP "connection tracking", and the details are a little more complicated than described here but not a lot more. As with TCP, these are considered outbound connections because the initiating packet is outbound. There's no need for hole punching, which is a set of unreliable techniques to enable inbound connections. Firewalls and routers have supported NAT for UDP as long as they have for TCP in practice. They haven't supported NAT for other IP protocols such as native SCTP. This a major reason why QUIC is built on top of UDP, so outbound QUIC connections work already over most NAT routers, at home, at work and mobile.
- xg15 5y agoThat clears up a lot. Thanks!
- deleted 5y ago[deleted]