Main Content

Troubleshoot Communication Failure Through Firewall

I see communication timeout errors or access errors with my target computer. Some issue with the Windows® Defender Firewall or Symantec Endpoint Protection firewall of the development computer causes a communications failure with the target computer.

What This Issue Means

This failure occurs when the firewall settings in the firewall software block communications with the target computer. The firewall configuration must not block the IP addresses that the development and target computers use to communicate.

Try This Workaround

Configure the firewall settings for the Windows Defender firewall or Symantec Endpoint Protection firewall.

Configure Windows Defender Firewall

Configure the firewall settings in Windows Defender Security Center to allow communications between the development and target computers.

  1. Confirm that the firewall on the development computer is Windows Defender. In the MATLAB Command Window type:

    [~,antivirus]=system('WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List')

    The antivirus software displays as Windows Defender.

  2. Find Allow an app through Windows Firewall by using the Windows search. For MATLAB R2020b, select Allow another app. As the Network type for <matlabroot>\bin\matlab.exe, select Public.

  3. Find Windows Defender Firewall with Advanced Security by using the Windows search.

  4. Select Inbound Rules and New Rule.

  5. For the Rule Type, select Custom, and click Next.

  6. For the Program, select All programs, and click Next.

  7. For the Protocol and Ports, select Any, and click Next.

  8. For the Scope, add the IP address of the development computer in Which local IP addresses does this rule apply to? and add the target computer IP address in Which remote IP addresses does this rule apply to?.

  9. For the Action, select Allow the connection, and click Next.

  10. For the Profile, select the Domain, Private, and Public check boxes, and click Next.

  11. For Name, provide a Name for this inbound rule (for example, Simulink Real-Time inbound), and click Finish.

  12. Select Outbound Rules and click New Rule.

  13. Repeat steps 4 through 10 for the custom outbound rule.


If there are steps in this procedure that you cannot complete —for example, if the Public network option in step 2 is not available (disabled/grayed out)— contact your local IT staff for assistance. Simulink Real-Time operation relies on completely following the steps in this procedure.

Configure Symantec Endpoint Protection Firewall

If you are using Symantec Endpoint Protection software and get an error message that Simulink Real-Time failed to connect to the target due to a timeout issue, try this workaround:

  1. In the Windows Start menu Search, type firewall and network protection and open the selection.

  2. Under the Domain network selection, click Open Symantec Endpoint Protection.

  3. Select Settings > Firewall > Program Control.

  4. Add the matlab.exe path to the list and select Allow access.

Related Topics

External Websites