theCNG27
theCNG27

Reputation: 425

UDP port forwarding required?

Sorry because of this dumb question but I didn't quite find an answer. So for TCP only the server needs a port forwarding, but not the client. But since UDP doesn't technically differentiates between client and server, do I have to port forward for the client too? (AFAIK TCP does it itself as soon as it connects to the server)

Upvotes: 2

Views: 3208

Answers (1)

Chris Dodd
Chris Dodd

Reputation: 126203

If the client is behind a NAT firewall, then yes, you will need a client port forward. Many NAT routers support "automatic" UDP forwarding, that automatically sets up a temporary port forwarding whenever it sees an outgoing packet (the client is sending data to the server), so that the reply packets can make it back to the client. You may need to configure your router to enable this, and may need to set various timeout parameters to make it work properly (since UDP does not have any timeouts built into the protocol).

Note that this kind of reverse port forwarding is ALSO needed for TCP, but all NAT router/firewalls do that automatically, as they would be useless without it.

Upvotes: 8

Related Questions