Test your network connection
Mục Lục
Overview
Sometimes the Code42 app can’t make a network connection even if the Internet appears to be working. This is because the Code42 app relies on specific ports to be open. This article describes how to test connectivity on the correct ports to rule out problems with firewalls, anti-virus products, or other network issues.
This article describes the following tools to check network connections:
- PowerShell (Windows only)
- Netcat (Mac and Linux)
- Telnet
What are ports?
Ports are specific doorways for Internet traffic to travel through. If your computer were a building, ports would be numbered doors leading outside. If a door is locked, you can’t get out. The Code42 app needs to open two specific doors: #443 and #4287. Other applications on your computer use other doors. So if your email and the Internet work, but the Code42 app does not, you should make sure that the proper ports are unlocked.
Before you begin
To troubleshoot a connection, you need to know the addresses and ports you are attempting to connect to. If you do not know the addresses and ports for your Code42 instance, contact your Code42 administrator or our Technical Support Engineers.
When troubleshooting your network connection, it is important to test all of the addresses and ports used by your Code42 app to connect to the Code42 server. The examples later in this article use address clients.us.code42.com
; in addition to this address, make sure to test all of the addresses that the Code42 app uses.
Following are common addresses and ports:
- US1:
clients.us.code42.com 4287
- US2:
clients.us2.code42.com 4287
and443
- US3:
clients.gov.code42.com 4287
(Code42 federal cloud servers only) - EU1:
clients.ie.code42.com 4287
Ensure port 4287 is open
To communicate with the Code42 cloud, ensure that
To communicate with the Code42 cloud, ensure that port 4287 is open.
PowerShell (Windows only)
PowerShell is a scripting tool for Windows. Windows PowerShell comes installed by default in Windows.
- In the lower-left corner, click the Windows icon and type:
PowerShell
- At the PowerShell prompt, enter the Test-NetConnection command:
Test-NetConnection -ComputerName <address> -Port <port>
The Code42 app uses port 443 and 4287 to connect to authority servers and the Code42 cloud. If you are unsure which port to include, test all.
Example:
Test-NetConnection
-
ComputerName clients.us.code42.com -Port 4287
If the connection passes, a TcpTestSucceeded: True message displays similar to the following:
ComputerName : clients.us.code42.com RemoteAddress : 192.0.2.0 RemotePort : 4287 InterfaceAlias : Ethernet0 2 SourceAddress : 192.0.0.0 TcpTestSucceeded : True
If the connection fails, a failure message displays, for example:
WARNING: TCP connect to (192.0.2.0 : 4287) failed
If the connection fails, troubleshoot the failed connection.
Netcat (Mac and Linux only)
Netcat is a networking utility for reading from and writing to network connections using TCP or UDP. It is installed by default on Mac and Linux.
Mac
- Select Utilities > Terminal.
- Enter the command:
nc -vz <address> <port>
The Code42 app uses port 443 and 4287 to connect to authority servers and the Code42 cloud. If you are unsure which port to include, test all.
Example:
nc -vz
clients.us.code42.com
4287
If the connection passes, a success message displays similar to the following:
Connection to clients.us.code42.com 4287 port [tcp/https] succeeded!
If the connection fails, a failure message displays, for example:
nc: connectx to clients.us.code42.com port 4287 (tcp) failed: Operation timed out
If the connection fails, troubleshoot the failed connection.
Linux
- Open Terminal.
- Enter the command:
nc -vz <address> <port>
The Code42 app uses port 443 and 4287 to connect to authority servers and the Code42 cloud. If you are unsure which port to include, test all.
Example:
nc -vz
clients.us.code42.com
4287
If the connection passes, a success message displays similar to the following:
Connection to clients.us.code42.com 4287 port [tcp/https] succeeded!
If the connection fails, a failure message displays, for example:
connect to clients.us.code42.com port 4287 (tcp) failed: Connection timed out
If the connection fails, troubleshoot the failed connection.
Telnet
Telnet is a protocol to provide communication over the Internet or a LAN a using a virtual terminal connection. It is installed by default on Linux and older Mac operating systems, but must be installed on Windows and macOS High Sierra 10.13 and later.
- Install Telnet if it is not already installed.
- Open the command prompt:
- Windows:
- Select Start.
- Choose Run or Search.
- Enter:
cmd.exe
- OS X: Select Utilities > Terminal.
- Linux: Open Terminal.
- Windows:
- Enter the command:
telnet <address> <port>
The Code42 app uses port 443 and 4287 to connect to authority servers and the Code42 cloud. If you are unsure which port to include, test all.
Example:
telnet clients.us.code42.com 4287
If Telnet successfully connects, a message displays similar to the following:
- Linux and Mac
telnet clients.us.code42.com 4287 Trying 192.0.2.0... Connected to code42.com. Escape character is '^]'. Connection closed by foreign host.
- Windows
The successful connection message scrolls by quickly and you are presented with a blinking cursor on a blank screen. (You can press Enter to return to the command prompt.)
If the connection fails, troubleshoot the failed connection.
Install Telnet
Install Telnet on Windows
Telnet is not installed by default on Windows; if you try to run it you will get the message “‘Telnet’ is not recognized as an operable program or batch file.” To install Telnet:
- Click Start.
- Select Control Panel.
- Choose Programs and Features.
- Click Turn Windows features on or off.
- Select the Telnet Client option.
- Click OK.
A dialog box appears to confirm installation. The telnet command should now be available.
Install Telnet on Macintosh
Telnet is not installed on macOS High Sierra 10.13 and later. To install Telnet:
- Paste the following into the Macintosh terminal prompt to install Homebrew, an open-source software package management system:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Run the following command in the terminal prompt to install Telnet:
brew install telnet
Troubleshoot a failed connection
If you cannot connect, you may see one of the following messages, some other message, or no response:
- Tcp connect failed
- Connection refused
- Operation timed out
- Unable to connect to remote host
If your test did not connect to the other computer, your issue is caused by the computers or network configuration, not by the Code42 app. Check the following common causes of this issue:
- Either computer’s router, including its network configuration or port forwarding settings
- Other conflicting software on either computer, such as antivirus, security, or parental control software
Further isolate the issue
If the connection test passes, there probably isn’t an issue with the network. However, some
If the connection test passes, there probably isn’t an issue with the network. However, some firewall and anti-virus applications are capable of blocking connections on a per-application basis. Make sure the Code42 app has an exception configured in your security software. If the problem continues, contact your administrator.