If I set up port forwarding on a machine, install the OS on the virtual machine. Can I change those forwarded ports later?
My situation --> I set up a linux webserver virtual machine (ubuntu-server) running on my host machine (also ubuntu-desktop). I initially set it up to forward port 2222 to ssh 22 on the virtual machine. It worked, and all was well. But then I wanted to change it to forward another port. So something like forward 7683 (just an example) to port 22 on the virtual machine.
I used the VBoxManage setextradata command to add these forwards and then remove them, and then add the new forwarded ports. But now I can not get anything to connect on the new port.
I read something on a webpage somewhere during my search saying I would need to re-install the virtual machine. That once the ports are set you can't change them. Is that true?
I also tried removing all the forwarded ports, and then tried adding them using this command
Code: Select all
VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22" Any suggestions would be greatly appreciated.