Facing issues due to TCP Port Reuse and Retransmission for HTTP traffic.
My deployment is as follows:
I have a squid proxy installed on a unix machine which is sending handling http requests coming from an trusted source. Squid then forwards to a URL Filter which has a list of whitelists and blacklists. This URL filtering engine which will allow/block URL according to the rule.
From client I have run a script which does 500 wget to www.naukri.com in a loop continuously. This URL I have blocked on URL filtering engine.
After some requests ~120 wget got hanged in between for exactly 1 min. During this hanged state, I took tcpdump on server and found that it is showing "TCP port numbers reused" and start sending sync packet with same port which was used earlier and showing "TCP Retransmisson". Also FIN, ACK and RST received for the earlier request.
Attaching tcp dump screenshot for reference:
Can you please let me know why it is using same port for the new request and re-transmitting the packet again? Is there a way to avoid port reuse?