1
1
How can I use Virtualbox custom NAT and also port forward?
For demos, I am running my VMs behind NAT on my laptop. If I run it in the vanilla NAT mode, then each VM I spin up automatically gets 10.0.2.15 and I can port forward traffic from my host laptop to it (e.g. browse HTTP interface by typing in https://127.0.0.1:8000 in my browser).
The problem however comes when I do mutiple VMs at the same time with this native NAT. All of them get 10.0.2.15 as an IP, so they cannot see each other for the demos I am setting up. When I do custom NAT (i.e. a unique 10/172/192 net I create just for my laptop), I unfortunately cannot do port forwarding (not an option in the GUI when I select this networking option in each VM's settings).
I'm hoping to both bridge VMs, use NAT, and port forward from my house. I supposed I could start putting multiple interfaces on them in vanilla NAT so they could see each other on this other internal VLAN I create, but I was hoping there was an easier way.