Knowledge base

Testing TCP port connectivity between computers and devices

Posted in Apple Mac OS

Test basic communication

First, find and note the IP address of the computer, Apple TV, or device you are trying to connect to, such as "10.0.1.35" or "my-imac.local".

  • Mac: Open System Preferences and type "IPv4" into the search field in the upper-right and press Return.
  • Windows: Type cmd in the search bar then press the return key. Type ipconfig and press Return. The IP address of the computer you are viewing is displayed next to the line "IPv4 Address".
  • Apple TV: Go to the Settings menu on Apple TV, select General > Network. 
  • For iPhone, iPad, or iPod touch connected via Wi-Fi: Tap Settings > Wi-Fi, and tap the blue arrow next to the Wi-Fi network you are connected to.

Next, use Ping to confirm that basic network communication with the target device is working. Ping tells you if an address you specify can be reached. If Ping doesn’t work when trying to connect to a device on your local network, troubleshoot a network connection issue. Note: Ping response is sometimes disabled by the recipient, or your network provider. If you are testing a connection to a device outside of your local network, try the "Test specific ports" steps of this article instead.

Using Ping in OS X

  1. Open Network Utility and click the "Ping" tab.
  2. Enter the IP address you noted in the Ping field.
  3. Click the Ping button.

Successful pings show you that bytes are received, followed by the time in milliseconds that it took for the message to travel.

successful ping Mac

Unsuccessful pings indicate a request timeout:

Using Ping in Windows

  1. Type cmd in the search bar and press Return.
  2. In the window that appears, type ping followed by the IP address you noted, then press Return.
  3. Troubleshoot network connectivity on a PC with this Microsoft article.

Unsuccessful pings indicate a request timeout:

   

 

Test specific ports

Find out which TCP and UDP ports Apple software uses, then follow these steps to find out if that port is accessible on your computer. For example, if you want to make sure iTunes sharing is accessible, test to see if port 3689 is reachable on your computer.

To test which ports are accessible (open) on your local computer, use the steps for your operating system below.

Checking local open ports using OS X

  1. Open Network Utility and click the Port Scan tab.
  2. Enter the IP address 127.0.0.1 in the Port Scan field.
  3. Select the "Only test ports" checkbox.
  4. Enter the applicable port from this article (such as 3689 for iTunes Music Sharing or AirTunes) in both port number fields.

If the issue you are testing involves iTunes, be sure iTunes is open and running in the background. Then, click the Scan button. If you do not see "Open TCP Port:…"  in the scan results, check the security software that is installed on the local computer you are testing.

Successful port tests show that the port you specified is open:

successful local port scan

Unsuccessful port tests display no open port results for the specified range:

unsuccessful local port scan

Checking local open ports using Windows

  1. Type cmd in the search bar and press Return.

  2. Type telnet followed by the port you want to test from this article (such as 3689 for iTunes Music Sharing or AirTunes/AirPlay).

  3. Press Return three times in a row.

If the issue you are testing involves iTunes, be sure iTunes is open and running in the background. If you see "Command not found" when trying to open Telnet, you may need to download Telnet from Microsoft.

If the request was successful, the message "400 Bad Request" appears, similar to the following:

If the request was not successful, a "Connect failed" message appears, similar to the image below. If this is the case, check the security software of the Windows PC that is installed on the computer you are testing. 

 

Test port availability on a different computer on your network

Test that the desired ports are accessible on a different computer or device on your network. Take note of the IP address of the destination computer or device. To find the IP address, use the steps above under "Testing basic connectivity between 2 computers or devices". Identify which port or set of ports you wish to scan, based on which issue your are having. (See Well known TCP and UDP ports used by Apple software products for a list of ports, and take note of the ports pertaining to your issue.

Checking a remote computer using OS X

Open Network Utility from the Applications > Utilities menu. Click the "Port Scan" tab and enter the IP address of the destination computer or device. (An example may be 10.0.1.35.) Check the "Only test ports…" check box and enter the applicable port from this article (such as 3689 for iTunes Music Sharing, AirTunes/AirPlay) in both port number entries. If the issue you are testing involves iTunes, be sure iTunes is open and running on the destination computer. Then, click the "Scan" button. If you do not see "Open TCP Port:…" (highlighted below) in the scan results, check the security software of the Mac or PC that is installed on the destination computer you tried reaching.

Below is an example of a successful test of port 3689 on a destination computer:

successful remote port scan

Below is an example of an unsuccessful local test of port 3689. 

unsuccessful remote port scan

If this occurs, test whether or not the same port is accessible by following the steps above under "Test ports on your local computer". If the same port is accessible on the other computer locally, the issue may lie in the network configuration. Check your network settings or network administrator. If the port is not accessible on the other computer locally, check the security software on the destination computer.

Checking a remote computer using Windows

  1. Type cmd in the search bar and press return.
  2. Type telnet followed by the IP address of the destination computer or device, (for example, 10.0.1.35), then type the applicable port number you wish to test from this article.
  3. Press the return key 3 times in a row.

If the issue you are testing involves iTunes, be sure iTunes is open and running on the destination computer. If you see "Command not found" when trying to open Telnet, you may need to download Telnet from Microsoft.
 

If the request was successful, you will see a message "400 Bad Request" similar to the following:

If the request was not successful, you will see a "Connect failed" error, similar to the image below.

If this occurs, test whether or not the same port is accessible by following the steps above under "Test ports on your local computer". If the same port is accessible on the other computer locally, the issue may lie in the network configuration. Check your network settings or network administrator. If the port is not accessible on the other computer locally, check the security software on the destination computer.

Read Full Article