UDP traversal through router automatically without router port forwarding?

Everyone knows the router is working like a firewall. Without port forwarding, a connection (no matter TCP or UDP) cannot be initiated from outside of the router. However, if a user initiate a TCP connection successfully from internal of the router, both sides of the router can then communicate with each other.

What happens to the UDP? If a user behind the router (he does nothing at all about port forwarding) sends a UDP to an external pc (assuming without any firewall or anything stopping receiving datagram in that pc), and the pc receives it. What if the PC wants to send some data back to the user who is behind the router? Can the data be received by the user? or can the data go through the router without any special operation?

I ask this because everyone knows UDP is connectionless. However, I believe some online shooting games use UDP. If I join a server to play, i will not need to do anything about port forwarding, but the udp data transfer between me and the server can still work.

Can anything explain some to me?

Thanks a lot.

Jack


Solution 1:

A stateful firewall can track UDP. It just creates an established connection for UDP once it has seen a packet coming from a masqueraded internal machine to an IP address on the internet. Any responding traffic is automatically forwarded to the internal machine.