I can't access a macOS ventura vm via port forwarding

Discussion in 'Parallels Desktop on a Mac with Apple silicon' started by CarlosE14, Jun 29, 2023.

  1. CarlosE14

    CarlosE14 Bit poster

    Messages:
    1
    Good afternoon, I am using the trial of parallels desktop 18 for Mac Pro Edition (version 18.3.1 53614) on a host macOS Ventura version 13.4.1 running in Mac Studio with an Apple M1 Max chip.

    Our intention is to test if Parallels meets the features we need before purchasing the license, we need to be able to create macOS virtual machines (Big Sur, Monterrey, and Ventura) and access them from outside the host.

    At the moment we have created a VM with Ventura running on Parallels and we have configured the port forwarding to access from outside the host on a specific port, and this is not working for us.
    On the host Mac, we have the firewall disabled and no port blocked, but we can't get this connection.

    If we make the ssh connection through port 22 to the IP of the macOS VM, we access correctly, but when we try to make the connection through the host IP and the port configured for port forwarding, this connection is rejected, I share the commands:

    connection to the exposed port and Host IP (localhost):
    upload_2023-6-29_9-41-26.png

    Parallels network configuration:
    upload_2023-6-29_9-42-51.png

    prlsrvctl net list:
    upload_2023-6-29_9-44-48.png
     
  2. WazuhP

    WazuhP Bit poster

    Messages:
    3
    Hello, we have finally purchased a Business license.

    We still have the same problem even after configuring the VM according to https://kb.parallels.com/en/128842
    The fix proposed by other users using a config.ini file in the VM bundle also does not allow connection via port forwarding, despite Parallels detecting it

     
  3. Pramesh Boodadoo

    Pramesh Boodadoo Staff Member

    Messages:
    539
    Hello,
    Please note that currently port forwarding is not supported on macOS hosted on Apple Silicon Mac.
    As a work-around, kindly set your virtual machine to bridge mode by following the instruction in this article: https://kb.parallels.com/en/128519
    Also, please note that there is a feature request to support port forwarding on macOS virtual machine hosted on Apple Silicon Mac.
    We submitted, added your request to our Development team.
    Once there is a response from them - whether it is a request for additional information, a workaround or a permanent fix - we will let you know.
    Thank you.
     
  4. WazuhP

    WazuhP Bit poster

    Messages:
    3
    Thanks for confirming my suspicion that port forwarding doesn't work on M1, I haven't found a site in Parallels that says it explicitly so if you could link it, I would appreciate it.

    I have followed the documentation that you have provided me and unfortunately, it is not useful for me: https://kb.parallels.com/en/128519, so I am going to explain how I solved my issue, I hope it will be useful to other users who have this problem with port forwarding from outside the host.

    • There is a macOS M1 machine that is intended to virtualize different custom macOS boxes on demand
    • For this, Vagrant is used through the vagrant-parallels plugin
    • If I set up a virtual machine without Vagrant, the default network is shared, when changing it with the documentation you provided, it can be confirmed that said machine now is set to bridge, but the machine does not have internet access since it does not assign a value for Router inside the VM
    • If I start the virtual machine with Vagrant, it is initially set to shared until I change it to bridge, but Vagrant sets the network back to shared
    • That is, Vagrant overwrites the initial configuration of the machine once vagrant up is used
    • If the Vagrant file is modified with the following code, the VM starts with a shared, host-only, and bridged adapters
    • Then, the vagrant up command shows:
    • With this configuration, a bridge network is established with which the VM can be accessed through vagrant ssh and ssh vagrant@vm_ip
    • Now, how to access this VM from outside the host without Parallels port forwarding functionality? Well, by establishing port forwarding in the system itself through
    • For example (I don't put IPs since anyone works
    • This will create a permanent link as long as the command is not canceled and can be accessed via
    Not ideal, but allows you to connect to the VM from outside the host
     
  5. WazuhP

    WazuhP Bit poster

    Messages:
    3
    As a note, in the Vagrantfile configuration, a port forwarding from 43222 to 22 is established, this is reflected in the Parallels configuration successfully (the port forwarding rule appears), but it does not work, so you have to use the ssh -L command to perform port forwarding from the host (so the same port is reused), in this second case, when performing a lsof order, the 43222 port appears in LISTEN mode
     

Share This Page