What TCP source ports are used by the ProxySG and how do I manage them?

<< Back to Knowledge Search



By default, the ProxySG appliance uses a randomly assigned source port in a range between 49152 and 65535 for outgoing connections. This is the ephemeral port range suggested by Internet Assigned Numbers Authority (IANA). On a busy appliance, this small range of TCP ports can result in the ProxySG reusing source ports at quick rate, which can cause issues with other devices such as firewalls or intrusion-detection applications. Those devices, upon seeing multiple requests with the same source and destination ports within a short window of time may flag the connection as invalid.

The exception to this is when Reflect Client IP is enabled. In that case, the appliance will use the source port from the client request + 16383 (wrapping at 65535) as it contacts the OCS; even if that port is lower than the configured range of ephemeral ports. This is by design, and is necessary to mirror the details in the client connection to the origin server.
You can resolve this issue by either increasing the range of source ports the appliance uses, or by disabling the automatic randomization used to assign source ports to outbound traffic.

Configure the Source Port Range
tcp-ip inet-lowport <value between 1024 and 49152>

SG300#(config) tcp-ip inet-lowport 16384

This will increase the range of available source ports from the default of 16K  to the difference between 65,535 (max ports available) and this lowport specification. So, if you use 16,384 as the lowport value, then there are 48K ports in the new range.

Disable Source Port Randomization
tcp-ip tcp-randomize-port <enable|disable>

SG300#(config) tcp-ip tcp-randomize-port disable

Disables the new randomization algorithm and reverts to the behavior from version 4.x.

These commands are available in the following SGOS versions:
  • and later
  • and later
  • 6.x all versions
Additional Information
Bug Number
InQuira Doc IdKB4676

Article Feedback

Hide Properties
First Published      10/01/2014
Last Modified      02/10/2016
Last Published      03/10/2015
Article Audience
Product      ProxySG
Software      SGOS 5, SGOS 6
Topic      Installation / Configuration, Networking
Article Number      000015528
Summary      By default, the ProxySG appliance uses a randomly assigned source port in a range between 49152 and 65535 for outgoing connections This article describes how to change the default behaviour
Was this helpful?
Previous MonthNext Month