NAT Port Forwarding.

This is for discussing general topics about how to use VirtualBox.
Post Reply
DrBob
Posts: 3
Joined: 5. Mar 2019, 01:18

NAT Port Forwarding.

Post by DrBob »

I have a Mac OS X laptop running Virtual Box.
As its guest it has a windows 10 VM the network is configured for NAT

I need the windows guest (client) to be able to connect to the mac host (server) and I need the mac host to be able to connect to the windows guest (server).

The NAT gave the windows guest an IP address 10.0.2.15
The MAC host has an IP address of 192.168.80.55

The windows guest (server) is listening for connections on 10.0.2.15:4242
The mac client (server) is listening for connections on 192.168.80.55:4242

I am baffled by how this would work with one port forwarding rule...


I tried bridge but that didn't work.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NAT Port Forwarding.

Post by socratis »

Go to the top of the VM list, there's "Tools" entry, the first one. Click on the icon with the 3 dots (Image). Select "Network". If you don't already have a "Host-Only" network, create one. Accept the defaults, enable the DHCP server.

Go to the VM Settings » Network » Adapter #2 » enable that, set it to Host-Only to the network you just created.

By default the guest's IP will be 192.168.56.101, and the host's 192.168.56.1. Use those IPs to connect server and guest. No need for any port forwarding or anything like that...

BTW, you have an "OSX Host" and a "Windows Guest", not an OSX guest. But since this is a question that has nothing to do with either host or guest, I'm moving the thread to "Using VirtualBox".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
DrBob
Posts: 3
Joined: 5. Mar 2019, 01:18

Re: NAT Port Forwarding.

Post by DrBob »

Version 5.2.26 r128414 (Qt5.6.3)
I have 1 VM . Windoz10
My VM is DOWN.

When I goto the setting Icon above the vmlist, I get a popup Dialog and a button that says Network... I have a Adapter 1, 2, 3, 4
Adapter 1 is enabled and attached to Host-only Adapter
Below it there is a name pull down with only one entry "Not Selected"
At the very bottom is says Invalid setting detected.
Ok is not selectable .. cancel is.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: NAT Port Forwarding.

Post by socratis »

Please re-read the instructions. I didn't tell you to go to the VM settings as a first step, I told you to create a "Host Only network" first. Did you do that? Doesn't look like it... Here are the instructions again:
socratis wrote:Go to the top of the VM list, there's "Tools" entry, the first one. Click on the icon with the 3 dots (Image). Select "Network". If you don't already have a "Host-Only" network, create one. Accept the defaults, enable the DHCP server.
DrBob wrote:Adapter 1 is enabled and attached to Host-only Adapter
Good.
DrBob wrote:Below it there is a name pull down with only one entry "Not Selected"
Because you didn't create the Host-Only network from the first step. If you do, it's going to be the network that you created in the first step.
DrBob wrote:At the very bottom is says Invalid setting detected.
That's expected. You chose "Host-Only network" without having created a Host-Only network...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
DrBob
Posts: 3
Joined: 5. Mar 2019, 01:18

Re: NAT Port Forwarding.

Post by DrBob »

Thank you for your patients.
I did my best after not being able to follow the first instruction.
I am looking for the tools with three ... above the 'list of VMs'
Image
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: NAT Port Forwarding.

Post by BillG »

You don't see the box with illustrations of a file, a spanner and a screwdriver and the word Tools?

If you can see it, do you get a flyout if you click the menu icon at the right of the box? If you do, click the item for Network.
Tools.PNG
Bill
Post Reply