Ports setup for 1C Enterprise server
If you need to use 1C Enterprise on a computer located outside the local network, for example, in an office in another city, these are the settings needed.
Interaction between client part and server
We all know that the interaction between the client part and the server part takes place on certain ports. Different sets of programs use their own sets of ports. It is also worth noting that in order to ensure that the ports do not overlap between programs, most programs can set their own ports.
So by default the following ports are used in 1C 8.3:
- 1540 - server agent port in 1C
- 1541 - cluster manager port
- 1560-1591 - ports of working processes
To successfully connect the client and the server, you need to specify the server IP address and ports for the 1C server in the connection settings. For a local network, this is enough to ensure the work without interruptions.
Port forwarding
If the client's computer is in another office and cannot see the server that is in the local network. But it can see the public IP address of our router, which was given by the provider when connecting to the Internet.
If the public IP address is set and the connection still fails, it is because the router accepted the request from the client, but it is not a 1C server, so it rejected the request.
To prevent this from happening, you need to tell the router what to do with the request that comes to a certain router port, to configure port forwarding.
You need to configure the ports as such:
| External port | Internal port | IP-address | Protocol |
| 1540 | 1540 | 192.168.1.100 | TCP |
| 1541 | 1541 | 192.168.1.100 | TCP |
| 1560 | 1560 | 192.168.1.100 | TCP |
| ... | ... | 192.168.1.100 | TCP |
| 1591 | 1591 | 192.168.1.100 | TCP |
Now if in the remote office in the program settings specify the external IP address of the router and the ports that we specified in the "External port" column, the connection to the server will be successful.
It should also be noted that the external ports of the router may differ from the internal ports in 1C 8.3. For example, instead of 1540, you can specify 2844 and so on. In this way, we can protect ourselves from malicious attacks on standard ports.