TCP service numbers or "service ports" (not to be confused with radio PORTs), are standard or "well known" numbers between 0 and 65535 which are used in combination with an IP address to access a particular process (usually a server) on a system.
The default TCP service port numbers for XRPi's servers, and the corresponding configuration keywords used in XROUTER.CFG are as follows:
Keyword TCP Port Service Name
--------------------------------------------
ECHOPORT 7 Echo server
DISCARDPORT 9 Discard server
FTPPORT 21 FTP server
TELNETPORT 23 Telnet server
FINGERPORT 79 Finger server
HTTPPORT 80 HTTP server
TTYLINKPORT 87 Raw TTY link
RLOGINPORT 513 Remote login
SOCKSPORT 1080 Socks proxy server
APRSPORT 1448 APRS server
TELPROXYPORT 2323 Telnet proxy server
CHATPORT 3600 Chat server
AGWPORT 8000 AGW TCP host API
RHPPORT 9000 XRouter host API
By default, all the above services are enabled, on all of XRPi's IP addresses. I.e. the global IPADDRESS and any port overrides.
If you are not using the EXTERNAL interface to share the Ethernet adaptor, the default case is that these services will also be available via the Linux kernal IP addresses.
If you are using the EXTERNAL interface to share the Ethernet adaptor, these services will NOT be available via the Linux kernal IP addresses unless you explicitly say so (see below).
See LAN Interfacing for more information on using the EXTERNAL interface.
Overriding Default TCP Service Ports
You may wish to disable services, or change the TCP ports they use.
For instance, you may need to move the Telnet port if you have another process using TCP port 23 on the same machine. Or you may wish to disable the SOCKS server because you don't need it.
You may also choose to make some services available on XRPi's TCP/IP stack and not on Linux's stack, or vice versa.
To override the default, use one or more of the above configuration keywords in the GLOBAL section of XROUTER.CFG.
If you use the keyword without an argument, or with an argument of zero, that service is disabled.
For example, the following formats disable the Telnet server on both XRPi and Linux IP stacks:
TELNETPORT=
TELNETPORT=0
If you use the keyword with a single argument, the result depends on whether you are using the EXTERNAL interface or not.
If you are using the EXTERNAL interface, the argument applies only to the XRPi stack.
If you are not using the EXTERNAL interface, the argument applies to BOTH stacks.
With those rules in mind, the following example moves the Telnet server from the default port (23), to port 88:
TELNETPORT=88
If you supply TWO arguments, the first always applies to XRPi's stack and the second always applies to the Linux stack.
You may supply different numbers for each stack, or disable one and not the other. The numbers must be separated by whitespace, NOT commas.
For example, the following specifies that the TELNET server shall use TCP port 88 on XRPi's TCP/IP stack, and port 89 on the Linux stack:
TELNETPORT=88 89
This one disables the Telnet server on XRPi's TCP/IP stack, whilst enabling it for port 88 on the Linux stack:
TELNETPORT=0 88
Finally, this example enables the Telnet server on XRPi's TCP/IP stack, whilst disabling it on the Linux stack:
TELNETPORT=88 0