iPhone can't connect to Ubuntu Server VM running in Parallels on macOS

I use Parallels Desktop for my M1 Mac with Ubuntu Server ARM installed in the VM I made.

I installed apache2, Node.js and npm on this VM, and it works, only on my Mac (when visiting the private IP of the machine) and using curl on the VM.

I can't view it on my iPhone.

Image from my Mac:

image

Image from the VM:

image2

Image from my iPhone

image3


The IP address is of the VM as the connection between your Mac and the VM presents. This is a private connection. Your router has no knowledge of this IP address, so doesn’t know how to route the IP.

  1. Port forward some port on your Mac to the VM in Parallels preferences.
    1. Enter a port to open on your host. HTTP is usually port 80.
    2. Port forward to your VM, select it from the list.
    3. Enter the port that your web server runs on in your VM, for example 80.
  2. Enter the IP address of your Mac on your iPhone and the first port number chosen in the previous step.

Your router routes from your phone to your Mac, and Parallels port forwarding routes to the VM.