Page 1 of 1

NAT Port Forwarding For One Of Multiple Host IP Address

Posted: 22. Mar 2009, 10:24
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

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

Posted: 22. Mar 2009, 15:05
by Sasquatch
That is currently not possible.

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

Posted: 23. Mar 2009, 19:02
by jongarrison
Sorry to hear that, but thanks for the information

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

Posted: 17. Jun 2009, 21:12
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?

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

Posted: 18. Jun 2009, 20:49
by shervy
is that possible ? does it exist ?

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

Posted: 19. Jun 2009, 16:37
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" :)

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

Posted: 19. Jun 2009, 18:30
by vbox4me2
Consider posting this change on bugtracker, it might get included.

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

Posted: 21. Jun 2009, 16:34
by 403