Paravirtualized Network* (virtio-net) is the key
-
select your vm that you want for port forwarding.
- NOTE: Make sure the vm is in stop mode.
-
Select “Settings”
- Select “Network”
- Select any free Adapter. Lets say “Adapter 2”
- Enable “Enable Network Adapter”
- In Attached to dropdown, select “NAT”
- Select “Advanced”
- In Adapter Type: Select “Paravirtualized Network (virtio-net)” [ This is important ]
- Select “Port Forwarding”
- In Right hand part of the “port forwarding” dialog box, select “+”
-
Provide the
- Name: Anything you want. example for ssh, say “ssh”
- Protocol: Type of protocol [ for ssh: TCP ]
- Host IP: provide hostname from which host you want to connect to [ over here: 127.0.0.1 ]
- Host Port: On what port of that Host you want to connect to remote port [ example: 60022 ]
- Guest IP: Leave it Blank
- Guest Port: To what port you want to connect from the above host. [ for ssh, the default 22 ]