Skip to content
Smarter by Design.Simpler for Business

Destination Port ​

What Is the Destination Port Condition? ​

Destination Port is a condition type that enables requests coming to a vService running on TR7 to be evaluated according to the port number they are directed to.

This condition is based on the destination port number that the client wants to access, and plays a critical role especially in architectures that listen on more than one port on the same vService.

The Destination Port condition does not perform an operation by itself; only when the defined port matches is the condition considered met, and it enables the actions bound to this condition to take effect.

Single vService · multiple ports
:80HTTPRedirect to HTTPS
:443HTTPSSecurity headers
:8443ManagementIP allowlist + strict access

A request coming to the same vService is separated according to which destination port it is directed to, and a different policy can be applied for each port.

The Importance of the Destination Port Condition ​

In modern application architectures, the same service can offer different protocols or services through different ports. For example, port 80 can be used for HTTP traffic, port 443 for HTTPS traffic, and port 8080 for the management interface.

With the Destination Port condition:

  • Different policies can be applied for different ports on the same vService,
  • Port-based access controls can be managed centrally,
  • Security rules specific to certain ports can be defined,
  • Traffic routing can be performed according to port ranges.

In this respect, the Destination Port condition is one of the basic building blocks of port-based traffic control on TR7.

Supported vService Types ​

HTTP
L7 TCP
Network

The condition can be used at both the request (At Request) and response (At Response) stages; the destination port information is detected at the time of the request and is evaluated over the same value at the response stage as well.

How to Add? ​

A new Destination Port Condition can be added through the TR7 web management interface by following the steps below:

  1. The Configuration Menu is opened by clicking the TR7 logo at the bottom left.
  2. The Load Balancer → Conditions → Add steps are followed.
  3. Destination Port is selected as Criteria.
  4. The related configurations of the condition are made.
  5. The condition is added by clicking the Add button.

Destination Port Condition Add Form ​

Destination Port Condition Add FormDestination Port Condition Add Form

INFO

Condition Name ​

An optional name can be entered for the condition to be created.

This field is especially important in the following scenarios:

  • When many conditions are defined under the same vService,
  • When conditions with similar criteria need to be distinguished,
  • When it is necessary to quickly understand which business rule the condition represents.

When this field is left empty, TR7 analyzes the content of the related condition and creates an automatic, descriptive name in the Condition Description field. This generated description is used as the name in condition lists.

INFO

Criteria Required ​

The field that determines the type of the condition; Destination Port is selected from the searchable dropdown list. This selection determines the fields displayed in the form. The criterion cannot be changed after the condition is saved: if a different criterion is needed, a new condition is defined. For all criteria in the list and their scopes, the criteria catalog on the Conditions page can be referred to.

INFO

Destination Port ​

The numeric comparison operator and value are entered. The form opens with the operator Equals to (=) selected and the value empty; the entered value must be an integer.

OperatorSymbolDescription
Less than<The value must be less
Equals to=The value must match exactly
Greater than>The value must be greater
Range-The value must be between two values

TIP

When the range operator (-) is used, both boundary values are entered and both boundaries are included. For example, the expression 80-443 covers all of the ports 80, 81, ..., 443.

TIP

The destination port value that the client accesses can be used in actions with the Destination port number smart variable (e.g. as the value of an HTTP header or a log field).

INFO

Condition Description ​

It is created automatically by TR7 in line with the entered criteria and values.

This description:

  • which value the condition applies to,
  • which criterion it works on,
  • the quick understanding of the condition on listing screens

is produced dynamically by the system so as to provide these.

INFO

Form Buttons ​

Add ​

The condition adding process is completed by clicking the Add button.

Add & Repeat ​

With the Add & Repeat button, the condition adding process is completed, and another new condition can be added with different configurations without leaving the related window.

Condition AddedCondition Added

Operational Usage Recommendations ​

  • Standard Ports Should Be Defined. Consistent policies should be created by defining conditions for standard ports such as 80 (HTTP), 443 (HTTPS) and 8080 (alternative HTTP).
  • Management Ports Should Be Isolated. The ports used for management interfaces (e.g. 8443, 9090) should be defined with separate conditions, and additional security policies should be applied.
  • Port Ranges Should Be Used Carefully. Wide port ranges can have a performance impact; specific port definitions should be preferred where possible.

Common Usage Scenarios in Live Environments ​

The examples below show how the related condition is applied in the most frequently encountered use cases in real systems. These scenarios are based on practices that are widely preferred in live environments and rest on experience gained in the field.

Scenario 1: Adding Security Headers to HTTPS Traffic ​

Purpose: To provide an additional security layer at the browser level by adding security headers to the HTTPS traffic coming to port 443, and to apply modern security standards (HSTS, CSP, X-Frame-Options).

Configuration: Destination Port → Equals to (=) 443

Action Recommendations:

  • ✅ Manage HTTP Security Headers → Security headers such as HSTS, CSP and X-Frame-Options are added automatically, and protection at the browser level is provided.
  • ✅ Add HTTP Header → The X-HTTPS-Verified: true header is added, and it is marked in the Backend Services that the request came over HTTPS.
  • ✅ Advanced Traffic Inspection → SSL/TLS versions, cipher suite usage and HTTPS traffic statistics are collected.

Scenario 2: Management Port Access Control ​

Purpose: To allow access to management ports such as 8443 only from authorized IP addresses and block unauthorized access attempts.

Configuration: Destination Port → Equals to (=) 8443

Action Recommendations:

  • ✅ Block → All access attempts outside the authorized IP list are blocked with 403 Forbidden (it is used together with the Source IP condition).
  • ✅ Advanced Traffic Inspection → Admin port access attempts, source IPs and access times are logged in detail.

Scenario 3: Blocking Development Ports in the Production Environment ​

Purpose: To prevent the use of development/test ports (8080-8090) in the production environment and close services left open by mistake.

Configuration: Destination Port → Range (-) 8080-8090

Action Recommendations:

  • ✅ Block → Requests coming to all ports in the 8080-8090 range are blocked with 403 Forbidden.
  • ✅ Show Content → The custom error page "Development ports are disabled in production environment" is shown.