Check the values of these sysctl MIBS
net.inet.ip.fw.dyn_keep_states
net.inet.ip.fw.dyn_keepalive
net.inet.ip.fw.dyn_short_lifetime
net.inet.ip.fw.dyn_udp_lifetime
net.inet.ip.fw.dyn_rst_lifetime
net.inet.ip.fw.dyn_fin_lifetime
net.inet.ip.fw.dyn_syn_lifetime
net.inet.ip.fw.dyn_ack_lifetime
Recently we encountered an interesting issue at work.
By accident our software started to quickly re-use a source TCP port when
connecting to a remote system. That is, after a graceful shutdown of a
connection (two FINs, etc), the software would quickly establish an identical
connection by re-us