I have created a web server(ubuntu server OS), on my web-development machine, using VMware Workstation. Now I want that I could point my website's nameservers to this virtual machine servers & thus do testing. So I need this virtual machine to be able accessible remotely from any computer via internet.

What settings do I need to configure for that ?

My Guest OS is ubuntu server 11.04 & host is Win7


There are a few different things you can do, however, if I take the most common thing people want to do...

If you mean that you are hosting websites/services inside the virtual machine, by far the easiest method you can do is to set up networking in "Bridged mode" so that each machine will be seen on the network like any other physical machine. Next, using your router, simply forward the ports you need (for example, 80) to the Virtual Machine's LAN address.

Then, simply set up an external dns entry that points to your public IP and you should be able to connect in from anywhere.

If I am wrong/you wanted to do something else, please let me know.

| improve this answer | |
  • Thanks, could you let me know how do I find out the lan address of VM & configure the router settings ? – Rajat Gupta Feb 21 '12 at 8:25
  • Once you set up bridged networking, the VM will act like any other machine on your network. It will either be a static ip that you set or be dynamically provided by your router... If it is Linux, at the command line, type "ifconfig", if you have a GUI, I am not sure the best way... As for your router, look for a setting called NAT, but, I can't really help you on that without knowing more - try taking a look at portforwarding.com where you may get some help there. – William Hilsum Feb 21 '12 at 10:28
  • internet connection just went away completely from the virtual machine after I set it to bridged mode (changing from the default NAT mode in which case it was working).. On trying ifconfig it shows some weird eth0 inet6 address with some characters. I also tried portforwarding.com but seems this site has been removed(nothing except for ads) – Rajat Gupta Feb 21 '12 at 10:36
  • any insights please ? – Rajat Gupta Feb 21 '12 at 20:04
  • 2
    Do you have DHCP enabled on your router? and/or does your machine have a static IP? ... Is this in your house/local or have you purchased a server somewhere? And, did you run ifconfig on the VM or the host? – William Hilsum Feb 21 '12 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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