What is a port; where are ports set in TR7?
Short answer
A port is the 16-bit TCP or UDP number (1–65535) that distinguishes the services running on the same IP address from each other; for example, 80 for HTTP and 443 for HTTPS are well-known ports reserved by IANA. A connection is identified by the source IP:port and destination IP:port pairs. In TR7, the port is set in four places: the Port field in the frontend row of a vService determines on which IP:port the vService will listen; in a Network vService, with Port Range, a port range is listened on in a single vService; the port of the Backend Service is written in the Address field and can be different from the frontend port; in Firewall rules, when Protocol = TCP or UDP is selected, the Destination Port field is entered with commas and ranges (e.g. 80,443,8000-8100). If a conflicting port on the same IP is entered in the vService form, a Port collision error is given and the record cannot be saved.
Where It Is Used in TR7
| Where | Field / label | What for |
|---|---|---|
| vService form → frontend row (HTTP, L7 TCP) | Frontend IP, Port | The IP:port the vService listens on; a vService can listen on more than one port with more than one row |
| Network vService form | Port, Port Range | Listening on a single port or on a port range |
| Backend Service form | The port in the Address field, Use Frontend Port | Which port of the server the connection is made to |
| Network → Firewall → Add | Protocol = TCP / UDP → Destination Port | The port(s) the rule will apply to |
| vService form (during saving) | The Port collision: <port> & <other-port> error | Preventing a conflicting port on the same IP |
| WEB-CLI | sys-cmd ss (ss), sys-cmd telnet (telnet) | Listing the listening ports; testing the connection to an IP:port |
Port Rules in TR7
- More than one port of the same vService: Can the same vService listen on both port 80 and port 443?
- More than one vService on the same IP:port: Can I define more than one vService on the same IP:port?
- Port range: Can I make a vService listen on a wide port range (e.g. 4000-5000)?
- The frontend and backend ports being different: Can the Backend Service port be different from the frontend port (sending a request received on 443 to 8080)?
Port collisionandPort binding error: What does the configuration error(s) warning in the vService preview (DNS Resolution Error, Port binding error) mean; where does Port Collision appear?
Common Misconceptions
- "Only one service runs on an IP." More than one service on different ports can use the same IP.
- "The port of the Backend Service has to be the same as the frontend port." The Backend Service can use its own port; if Use Frontend Port is on, the connection is made to the vService port the request came to.
- "In a Firewall rule, a port is entered for every protocol." The Destination Port field appears only when Protocol = TCP or UDP is selected; protocols such as ICMP have no port.
How it is done in the documentation
Related questions
- Can I define more than one vService on the same IP:port?
- Can I make a vService listen on a wide port range (e.g. 4000-5000)?
- Can the Backend Service port be different from the frontend port (sending a request received on 443 to 8080)?
- What does the configuration error(s) warning in the vService preview (DNS Resolution Error, Port binding error) mean; where does Port Collision appear?
