VirtualBox

Opened 11 years ago

Closed 11 years ago

#11965 closed defect (worksforme)

MacOSX guests on osxhost NAT has the wrong source IP.

Reported by: b2jrock Owned by:
Component: network/NAT Version: VirtualBox 4.2.16
Keywords: Cc:
Guest type: OSX Server Host type: Mac OS X

Description

I am using OSX Mountain Lion guests on a Mountain Lion Host. I have a NAT interface configured:

192.168.168.1 - Host's vboxnet0 IP address. 192.168.168.18 - Guest's NAT IP.

When I make any tcp connection from the guest to the host, the source IP of the connection is the host's IP (192.168.168.1). My expectation is that the source IP for the connection should be the guest's NAT IP, which indeed it is on other guest OSs (linux tested).

This causes problems with services that need to allow particular IPs, such as NFS

Change History (4)

comment:1 by b2jrock, 11 years ago

I tested this with the latest freebsd as a guest, it also has the same issue, so this is likely a *BSD issue.

Last edited 11 years ago by b2jrock (previous) (diff)

comment:2 by Klaus Espenlaub, 11 years ago

My initial guess is that there's a misunderstanding how NAT works currently in VirtualBox. First of all NAT has nothing to do with host only networking (including vboxnet0), it is effectively the host proxying all guest's network activities through the host's socket interface. So it's completely expected that the guest traffic looks like if it is originating at the host.

You're actually misconfiguring NAT if you select the same network as the host, because this will cause routing problems as there's a NAT gateway built into the VM process, and if it has the same network inside and outside (including a different network, e.g. host only) it will not work properly. Normally you should leave NAT at its default config.

I'm having big trouble distilling the exact VM config out of your description, please use the information in the Troubleshooting chapter in the manual. Especially VBox.log is very very valuable.

comment:3 by b2jrock, 11 years ago

You can close this, it was an issue of an interface not launching as expected, which really confused the network troubleshooting, sorry for the bother.

comment:4 by Frank Mehnert, 11 years ago

Resolution: worksforme
Status: newclosed

Thank you for letting us know.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use