VMware Communities
red888
Contributor
Contributor
Jump to solution

Port forwarding in vmware workstation 9 (how to forward all traffic to one VM)

Looking here: Advanced NAT Configuration  

I can see how to forward ports through vmware's NAT service to a particular host, but my question is how can I forward ALL traffic to a host? I haven't found any info on how to do this.

Is there a way I can forward all traffic incoming traffic to one VM?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

The syntax is <external port number> = <VM's IP address>:<VM's port number> and as such it's singular in all references so I do not know of a way around it.

View solution in original post

0 Kudos
6 Replies
WoodyZ
Immortal
Immortal
Jump to solution

Use Bridged instead of NAT, then there is no need to do port forwarding! Smiley Wink

0 Kudos
red888
Contributor
Contributor
Jump to solution

I'll try bridging again, but I had issues with it before with my wifi adapter running on linux. In the event it does not work, is there a way to forward all traffic to one VM with NAT?

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

The syntax is <external port number> = <VM's IP address>:<VM's port number> and as such it's singular in all references so I do not know of a way around it.

0 Kudos
dariusd
VMware Employee
VMware Employee
Jump to solution

I've looked through the code and can confirm there is no super-secret way to specify port ranges... it truly only allows individual ports to be specified.

Other than enumerating every possible port that could be needed (!!!), I think the only other solutions would be to use bridging (as discussed earlier) or to use some other 3rd-party tunneling solution to plumb the network traffic through to the VM.  Unfortunately, bridging to wireless is highly dependent on the behavior of the wireless NIC(s) and the access points(s) in question... It's nowhere near as universal as bridging on wired networks.

--

Darius

kurthill
Contributor
Contributor
Jump to solution

You can do some pretty advanced stuff using Unix/Linux bridges -- you create a bridge between a real (eth0) NIC and a dummy NIC, then bridge vmware to the dummy NIC.  This puts all of linux's powerful iptables commands "in front" of the vmware bridged network.  So you could have default forwarding to one VM, and specify a few ports to go another if you wanted...

eth0 --> (IPTABLES EFFECT HERE) --> br0 --> dummy0- --> vmware bridge --> virtual machine ethernet

Without this, it is:

eth0 --> vmware bridge --> iptables effects --> host

                 |

                 ----> vmware host

Check out:  http://www.troublenow.org/19/firewall-vmware-server-10x-guest-with-iptables-on-the-host/

red888
Contributor
Contributor
Jump to solution

Thanks for the replies. Yeah, there are many tutorials for bridging a wireless nic with a tun adapter as well, but my inexperience with the OS is the reason I was trying to avoid it. I have another WIFI adapter I can try, but if I can't bridge to that one in vmware either I guess I'll have to brush up on my linux\iptables skills.

0 Kudos