Edit1 Summary
ScreenConnect operates externally on ports 8040 and 8041 by default. We use these uncommon ports to avoid conflicts with other programs running on the same machine. However, changing the ports to more common ports provides several advantages. This article details the steps to change the ports.
Edit2 More Information
Edit2.1 Why Change Ports?
- Friendliness - The web (HTTP) uses port 80 by default. Use port 80 for the Web Server and your users will have a more friendly URL such as http://live.screenconnect.com/ rather than http://live.screenconnect.com:8040/
- Accessibility - Some corporate firewalls only allow outbound traffic on ports 80 and 443. Guarantee accessibility by sticking to these common ports.
Note: ScreenConnect also listens on port 8042. However, this is only used for internal communication within ScreenConnect, and will not benefit from changes to a more common port.Edit2.2 Open Configuration File
To change the ports you will first need to open the
web.config file, typically installed at the location below:
C:\Program Files\ScreenConnect\web.config
Edit2.3 Check Machine Listening Ports
To list what ports are currently in use on your machine, execute the following at a command prompt:
C:\>netstat -an | find "LISTENING" | find "TCP" | find /V "[::]"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:81 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:8040 0.0.0.0:0 LISTENING
TCP 0.0.0.0:8041 0.0.0.0:0 LISTENING
TCP 0.0.0.0:8042 0.0.0.0:0 LISTENING
Your results should be similarly formatted as above. The underlined values represent the ports on which services are listening. You will need to reference this output below when determining which ports to use for ScreenConnect.
Edit2.4 Changing Web Server Port
We recommend port
80 for the Web Server. This will give your users a friendly URL to type into their browser.
Locate the following line in your configuration file:
<add key="WebServerListenUri" value="http://+:8040/" />
The underlined segment should be changed to a new value.
If no other services are listening on port 80, you should change this value to listen on port 80 like the following:
<add key="WebServerListenUri" value="http://+:80/" />
If you have other HTTP services running on the machine, you will need to narrow your scope of listening. For example
IIS (Internet Information Services) may also need to listen for HTTP traffic on port 80.
To listen on port 80, but only for a certain host, use the following syntax, replacing
support.mycompany.com with your hostname:
<add key="WebServerListenUri" value="http://support.mycompany.com:80/" />
To listen on port 80, but only under a certain directory, use the following syntax, replacing
RemoteSupport with your desired directory name:
<add key="WebServerListenUri" value="http://+:80/RemoteSupport/" />
Advanced Note: ScreenConnect uses the HTTP Server API, which is part of Microsoft Windows and is used by IIS among other applications. Refer to the article on UrlPrefix Strings for detailed information on the syntax of the WebServerListenUri.Edit2.5 Changing Relay Port
We recommend
port 443 for the Relay. This will allow all users to pass outbound through their firewall. Unlike the Web Server, the Relay must have exclusive access to the specified port. If port 443 is not free, you likely gain nothing by changing this setting to a different port.
Edit2.5.1 Version 1.6 and later
Locate the following line in your configuration file:
<add key="RelayListenUri" value="relay://0.0.0.0:8041/" />
The underlined segment should be changed to a new value.
<add key="RelayListenUri" value="relay://0.0.0.0:443/" />
You can change the IP address on which the Relay Server listens if another service is using port 443. By default ScreenConnect listens on 0.0.0.0, which is all IPv4 IPs:
<add key="RelayListenUri" value="relay://0.0.0.0:443/" />
You can change this to a specific IP. For example, if you only wanted to listen on 1.2.3.4:
<add key="RelayListenUri" value="relay://1.2.3.4:443/" />
Edit2.5.2 Version 1.5 and earlier
Locate the following line in your configuration file:
<add key="RelayPort" value="8041" />
The underlined segment should be changed to a new value.
<add key="RelayPort" value="443" />
You can change the IP address on which the Relay Server listens if another service is using port 443. Simply add the following line in your configuration file and enter the IP Address you will be using in the Value:
<add key="RelayAddress" value="IP Address" />
Edit2.6 Testing Changes
Your changes will take effect immediately upon saving the configuration file. You should be able to execute the command to check listening ports to see that your changes have taken effect.
If you see any odd behavior,
check the Application event log for errors.
To access ScreenConnect externally, you will need to refer to knowledge base article,
HOWTO-0001, to configure your firewall.
You can use this tool to verify that your ports are open:
http://www.screenconnect.com/PortTest.aspxEdit3 References