Languages

Testing TCP port connectivity between computers and devices

Symptoms

Apple software uses particular TCP and UDP ports that security software or specific network configurations might block on your computer. Use these steps to find out if TCP ports are blocked or unreachable.

Resolution

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. For OS X v10.9 or later, click the Advanced button in the pane that appears, then click the TCP/IP tab. The IPv4 Address is displayed here.
  • 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 127.0.0.1 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" or "not recognized" when trying to use Telnet, you may need to install 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" or "not recognized" when trying to use Telnet, you may need to install 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.

Important: Mention of third-party websites and products is for informational purposes only and constitutes neither an endorsement nor a recommendation. Apple assumes no responsibility with regard to the selection, performance or use of information or products found at third-party websites. Apple provides this only as a convenience to our users. Apple has not tested the information found on these sites and makes no representations regarding its accuracy or reliability. There are risks inherent in the use of any information or products found on the Internet, and Apple assumes no responsibility in this regard. Please understand that a third-party site is independent from Apple and that Apple has no control over the content on that website. Please contact the vendor for additional information.
Last Modified: Sep 11, 2014
Helpful?
Yes
No
  • Last Modified: Sep 11, 2014
  • Article: TS5329
  • Views:

    17901
  • Rating:
    • 20.0

    (1 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked