KB06040401 - TCP/IP & Multi-homing
Mailtraq utilizes standard port assignments for all its TCP/IP activities. Ports in Mailtraq may be specified by port number or by the standard service protocol acronym, shown as 'Port Text' in the following list ...
|Protocol Name||Port No||Port Text|
|Simple Mail Transfer Protocol||25||SMTP|
|Post Office Protocol||110||POP3|
|Network News Transfer Protocol||119||NNTP|
|HyperText Transfer Protocol||80||HTTP|
|User Information (Finger)||79||FINGER|
|Internet Message Access Protocol||143||IMAP|
|Remote Logging Service||5001|
A port number may only be used once and for one purpose in Mailtraq (unless you are using Multi-Homing, where the same port can be used providing it is assigned to different IP addresses). If additional port numbers are required, for example for a TCP/IP Proxy Tunnel or for another instance of one of the above services, port numbers above in the user defined range (that is, 5000 and above) should be used.
Protocol port specifications may be added be added to the Services file if needed, in the following format:-
To set up client programs to access the specified port numbers, please refer to the documentation provided with the client program.
Multi-homing enables multiple service instances to be run on a single port by binding each service instance to a particular interface. Multi-homing is an alternative method of binding ports and services to interfaces and cannot be implemented on a port if a non-multi-homed service is already bound to that port. In addition, all interfaces specified must be available prior to the service being started.
Normally, if a second instance of a service is required, another free port must be used and clients wishing to use other instances must be reconfigured to connect to the new port assignment. However, Mailtraq also supports multi-homing of services such that individual service instances are bound to nominated interfaces. The significance of multi-homing is that it enables multiple instances of a service to be configured on the same port with access to those instances controlled automatically by the IP address specified by the connecting client.
Multi-homing is implemented automatically by Mailtraq if the TCP/IP Port assignment contains an IP address and colon separated port specification. For example, an assignment of 127.0.0.1:110 permits only clients running on the same machine as Mailtraq (because 127.0.0.1 is only visible to clients on the current machine) to connect to that service instance. An assignment of 192.168.1.1:110 permits only clients on the local LAN to connect to that service instance. (because the 192.168.*.* subnet is not visible outside your LAN). If you have multiple IP addresses, you can assign the service to just one of them using this method.
In the absence of an IP address and port assignment configured in the TCP/IP Port, Mailtraq listens automatically on all available interfaces on the specified port.
The following Mailtraq services support multi-homing configurations via their respective Service tabs:-
- SMTP Service
- POP3 Service
- NNTP Service
- HTTP Service
- FTP Service
- TCP/IP Proxy Tunnel
- Remote Logging Service
- User Information Service (Finger)
- WebMail Service
- IMAP Service
Example Usage: SMTP Service
In this example, the Mailtraq server is accessible via three separate interfaces – via 127.0.0.1 from the Mailtraq machine itself, via 192.168.1.1 from a machine connected to the Local Area Network (LAN) and via an Internet Service Provider (ISP) assigned fixed IP address of 184.108.40.206.
By creating a multi-homed configuration, separate instances of the SMTP Service can be presented to the users on each of those interfaces using the standard port for the SMTP protocol, port 25. Note that the ISP provided IP address here is only an example and only IP addresses which have been explicitly assigned to you should be used in this way. Depending on your Windows network setup, the ISP assigned IP address may need to be bound to the dial-up adaptor (Control Panel | Networks) before it becomes available for multi-homing otherwise it may only be active while connected to the Internet.
After checking that it is idle, remove the current SMTP Service instance on port 25 by selecting Active Connections in the Console Tree View and choosing Close Connection from its context menu (via right-click). In Service Manager, remove the existing SMTP Service definition and create three new instances – the first with a port specification of 127.0.0.1:25, that's the IP address followed by colon (ASCII 58) followed by the port number, the second with 220.127.116.11:25 and the third with 18.104.22.168:25. Start each of the new instances via Start command in the context menu. Under Active Connections, each instance of the SMTP service now announces the interface on which it is listening, for example "<accepting connections on 127.0.0.1:25>".
Each of the multi-homed SMTP instances may now be configured appropriately for their role. For example, the 127.0.0.1:25 and 192.168.1.1:25 instances might be configured to permit all relaying with no message size limits, whilst the only instance which can be accessed by external hosts, 22.214.171.124:25, might be configured to permit no relaying with a restrictive message size limit. Note that LAN users may still be able to access the 126.96.36.199:25 instance unless it is firewalled appropriately via its Access Control tab.