How can I randomize the ephemeral TCP source port numbers the Red Hat Enterprise Linux kernel is assigning my application?

Solution Verified - Updated -

Issue

  • The kernel is occasionally re-issuing the same ephemeral TCP source port for new connections from our client side application.  The problem is that the previous connection from that source port hasn't been closed on the server side so the server is not acknowledging the new connection.  How can I get the kernel to randomize the ephemeral source port numbers it is choosing so it doesn't pick the same source port number?

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content