Shared network
Normally, virtual machines set to operate in the Shared network cannot be accessed from external computers.
The port forwarding functionality allows computers on your local network and on the Internet to connect to any of your virtual machines that use the shared networking mode.
The connection to a specific port on your Mac will be redirected to a specific port of your virtual machine according to the port-forwarding rule.
Enabling port forwarding
Note: This feature is available in Parallels Desktop for Mac Pro and Business Edition only
- Open Parallels Desktop Network preferences by clicking Parallels Desktop icon > Preferences, then click Network.
- Click the Add (+) button below the Port forwarding rules list.
- In the displayed window, perform the following:
- In the Protocol field, specify the port type you want to use for establishing network connections. You can choose between the TCP or UDP port types.
- In the Source Port field, type the number of the incoming port on your Mac.
- In the Forward to section, indicate the name or IP address of the virtual machine you want to connect.
- In the Destination Port field, type the port on the virtual machine to which the data will be transferred.
4. Click OK to add the rule.
Checking port forwarding
To check that the rule works properly, enable e.g. SSH on your virtual machine (some Linux distributions have it enabled by default).
As an example for SSH, use the following rule:
Protocol | TCP |
Source Port | any |
Forward to | choose your Linux virtual machine |
Destination Port | 22 |
To make sure that port forwarding is enabled from your Mac inside a virtual machine, use one of the following scenarios:
Scenario 1: connect from the same Mac
In Terminal, type in the following command and press Enter:
Enter the password for the user in the virtual machine and press Enter.
Scenario 2: connect from another Mac or PC in the same network
In Terminal (on Mac) or PowerShell (on Windows) type in the following command and press Enter:
Enter the password for the user in the virtual machine and press Enter.
Note: Mac host IP address is the address of the Mac machine on which the target virtual machine is running.
To check that you're logged into the virtual machine, execute the following command in Terminal:
If you are successfully logged into the virtual machine, you will see a version of Linux kernel.
In case you are on macOS, you will see a version of Darwin kernel.
Was this article helpful?
Tell us how we can improve it.