Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got a VMWare server running the Turnkey Linux LAMP Stack.

I've been using this server for some development work and want to make it accessible to a colleague for some feedback.

As things stand, the VM uses the "NAT" network option - For some reason, using the "Bridged" option results in the TKL VM being unable to get any settings via DHCP and no network access if I set IP/Gateway/Etc... manually.

My router previously had a subnet mask of 255.255.255.0 and a gateway at 192.168.99.1.

The IP Address of the VM is 192.168.199.128

This is obviously outside the normal subnet - So I've modified the subnet on the router to be 255.255.0.0.

I've tried adding some port forwarding on the router so that MyPublicDomain:81 forward to 192.168.199.128:80. For some reason, connecting to MyPublicDomain:81 results in a server not responding error message.

The VM host is a Windows XP SP3 machine. I had hoped that using the appropriate LAN IP would route the packets as appropriate but it seems I was incorrect.

Can someone please suggest how I can export Port 80 on the VM to the outside world? Using a different external port is perfectly acceptable (NB: Port 80 is already used by the XP host).

I'm a linux newbie so am unsure if the problem is the linux VM or the port forwarding/routing.

Thank you in advance for any assistance you can provide.

The subnet is maintained by a D-Link WRT54G Router.

share|improve this question

1 Answer 1

I see two problems here, the first is that the 192.168.199.128 255.255.0.0 is not really valid because that would mean 192.168.0.0 is the network address and this probably conflicts with your other network. If the adapter is set to NAT it wont work in a bridged way just the subnet's are the same.

2nd part:

What is the IP address of your host? (I.E the range of the network that the router provides)

So assuming your network is setup like this (with 192.168.199.0 255.255.255.0):

(PublicIP):Router:(192.168.0.1)--------192.168.0.2:VMHOST:192.168.199.1------> 192.168.199.128(LinuxVM)

You cannot tell your router to forward to the 192.168.199.128 network because as far as the router knows it does not exist, only your VMHost does. Unless you setup some more port forwarding on the host to forward to the VM, and the rotuer to forward to the VMHOST it wont work. You could also setup something more routing but that can get a bit complex

Would I would suggest is trying to switch to bridged networking again and ensure that you are assinging the correct IP in the right subnet, if your router is on 192.168.0.1 you should assign something like:

IP: 192.168.0.10

Netmask: 255.255.255.0

Gateway 192.168.0.1

share|improve this answer
    
Thanks for taking the time to reply. As things stand, the router is 192.168.99.1 and VMHost is 192.168.99.100 I'll try switching back to beidge mode and see if I can cajole the VM into seeing the network... –  Basic May 2 '11 at 12:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.