NAT Port Forwarding For One Of Multiple Host IP Address

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jongarrison
Posts: 2
Joined: 22. Mar 2009, 10:16

NAT Port Forwarding For One Of Multiple Host IP Address

Post by jongarrison »

I have NAT port forwarding working fine for port 8080 of my host machine (Windows Server 2003) to port 8080 of my guest machine (ubuntu).

My next question though is how to set up forwarding for only one of the several IP Addresses that the host machine has (on one adapter). How do I get port 8080 to be forwarded for only one of the host machine's ip addresses? I've read through the documentation and searched extensively for this. I was hoping that there would be a simple key to set using vboxmanage setextradata, but I haven't found the appropriate key yet or any mention of it online.

By the way, the reason that I want to do this, is to have a server on the host machine listening on the same port, but different ip address than a server on the guest machine.

Thanks for any ideas,
Jon
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by Sasquatch »

That is currently not possible.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
jongarrison
Posts: 2
Joined: 22. Mar 2009, 10:16

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by jongarrison »

Sorry to hear that, but thanks for the information
403
Posts: 5
Joined: 17. Jun 2009, 21:06
Primary OS: FreeBSD
VBox Version: OSE self-compiled
Guest OSses: FreeBSD, Windows

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by 403 »

Sasquatch wrote:That is currently not possible.
Are you interested in a simple patch (similar to this one for qemu) that adds HostIP option?
shervy
Posts: 2
Joined: 18. Jun 2009, 20:47
Primary OS: MS Windows 2003
VBox Version: OSE other
Guest OSses: XP Ubuntu 9

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by shervy »

is that possible ? does it exist ?
403
Posts: 5
Joined: 17. Jun 2009, 21:06
Primary OS: FreeBSD
VBox Version: OSE self-compiled
Guest OSses: FreeBSD, Windows

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by 403 »

Here's a patch for 2.2.51_OSEr20451.
tcp_subr.c could use a less hackish approach but tcp_emu() shouldn't be used anyway because "XXX: libalias should care about it" :)
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by vbox4me2 »

Consider posting this change on bugtracker, it might get included.
403
Posts: 5
Joined: 17. Jun 2009, 21:06
Primary OS: FreeBSD
VBox Version: OSE self-compiled
Guest OSses: FreeBSD, Windows

Re: NAT Port Forwarding For One Of Multiple Host IP Address

Post by 403 »

Post Reply