Page 1 of 1

Making Debian VM accessible over LAN and Internet

Posted: 15. May 2014, 11:38
by AweSIM
Hi,

My end goal is to deploy a Linux VM on my machine and allow it to be accessed from:
1. My own PC.
2. Other computers on the network.
3. Computers not on my network via the internet.

So far, I've accomplished the #1 part. I've used NAT with ports forwarded as follows:
- 8888 -> 8080 (for Tomcat WebServer)
- 2222 -> 22 (for WinSCP)
- 3333 -> 3306 (for remote connection to MySQL)

My internet network is as follows:
1. My PC
2. My ISP's WiFi router
3. DSL line to the ISP

My router's IP is 192.168.1.1 and my PC's IP is dynamic 192.168.1.5 or something. On my host PC I can access the guest machine's Tomcat via "localhost:8888". But I can't access it via "192.168.1.5:8888", neither can anyone else on the same network. How can I circumvent this issue to allow anyone on my network to access my Linux VM? Furthermore, how can I allow the VM to be accessible via the internet?

Regards

Asim

Re: Making Debian VM accessible over LAN and Internet

Posted: 16. May 2014, 10:38
by noteirak
Use Bridged for the VM network mode in the VM config. Then, to access the VM from Internet, do the same as you would do for a physical computer.