Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usual timeout for UDP connection state with NAT

Tags:

timeout

udp

nat

As far as I have understood, when an UDP packet goes across a network address translator, the address on its header is changed and a line is added on a table so that answers can be properly handled and routed. I was wondering for how long this line lasts on the translation table if no answer is given. Obviously, it depends on the router manufacturer and settings. But what about a classical average configuration? An user connected to the internet via a WiFi router and a normal ISP NAT? I'd just need an order if magnitude. How long does an UDP "connection" lasts, approximately? One second? One millisecond? One hour?

like image 364
Matteo Monti Avatar asked Jan 25 '26 14:01

Matteo Monti


1 Answers

The timeout of a UDP connection state is often 30 seconds. There are packet filter implementations which adapt the timeout based on the number of states they currently use, e.g. if they have too much states they expire the states faster.

like image 92
Steffen Ullrich Avatar answered Jan 28 '26 15:01

Steffen Ullrich