How do you test connectivity to the Internet?

  1. Last updated
  2. Save as PDF

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 Customer Champions​. 

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 and 443
  • 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 port 4287 is open. 

PowerShell (Windows only)

PowerShell is a scripting tool for Windows. Windows PowerShell comes installed by default in Windows.

  1. In the lower-left corner, click the Windows icon and type: PowerShell
  2. 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

  1. Select Utilities > Terminal.
  2. 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

  1. Open Terminal.
  2. 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.

  1. Install Telnet if it is not already installed. 
  2. Open the command prompt:
    • Windows:
      1. Select Start.
      2. Choose Run or Search.
      3. Enter: cmd.exe
    • OS X: Select Utilities > Terminal.
    • Linux: Open Terminal.
  3. 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:

  1. Click Start.
  2. Select Control Panel.
  3. Choose Programs and Features.
  4. Click Turn Windows features on or off.
  5. Select the Telnet Client option.
  6. 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:

  1. 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)"
  1. 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 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.

  • Cannot connect to destination
  • Cannot connect to background service
  • Connect to Code42 cloud destinations from a proxy server
  • IP addresses and ports used by the Code42 platform

How can I test my Internet connection?

There are plenty of apps and websites that will test the speed of your connection. Some of the more popular speed test services include Speedtest.net, Fast.com or CloudFlare. Whether you install an app or use a website, it's a good idea to run the test a few times to get a sense of your connection's performance.

What is network connectivity test?

Connectivity Tests is a diagnostics tool that lets you check connectivity between network endpoints. It analyzes your configuration and, in some cases, performs live data plane analysis between the endpoints.

How do you check connectivity issues?

Test connectivity Ping a remote device to test connectivity..
Find out your IP address You can find IP details about your device to check for any misconfigurations..
Reset your IP address You can use the tool to refresh your IP address and get a new one to check for a DHCP error..

What test should you use for connectivity problems?

To test basic TCP/IP connectivity between two hosts, you can use the ping command. You can also use the tracert command on a Windows computer or traceroute on Linux to view the actual path that network traffic takes between two hosts.