How do I access VMs from internet

  • Thread starter Thread starter Koan
  • Start date Start date
K

Koan

Guest
Good day,
I have decided to teach myself network administration so I built a server and installed Proxmox and created virtual machines. All is well and can view the running VMs through the web interface vnc from other computers on my private netwok. The VMs have internet access.

I think I have a grasp of the network and how bridging works but my question is quite basic.

I have my server as 1 of 3 computers on my home network behind a home router with one ip address from my isp.

How do I access my VMs from the internet? My plan is to ssh tunnel into them. I can sort out the tunneling but I have no idea what IP address to use from the internet to connect with my VMs. Do I need to configure my router or do something with port forwarding? I am at a loss and have been searching but most posts assume that I already know this.

Same thing if I want to host a website. What ip address do I point my domain name to?

Additionally, after I get this basic down, I plan to use Shorewall should it be important in any responses.

Thanks.
 
Last edited by a moderator:
If your VMs are behind a router and have internal ips then you need to make simple port forwarding in order to be able to access them from internet. Lets say your isp ip is 123.123.123.123 and your vms ips are as internal ips like 192.168.1.x and in your router you need to forward lets say ssh 22 port to forward to 192.168.1.x when a request comes to 123.123.123.123 If you have basic network knowledge, assume your vm are clients within your internal network. All you need is port forwarding.
If you want to host a web site in internal network, then you need port forwarding for all necessary services like dns TCP-UDP-53, ftp 21, web sites 80, smtp 25,110 etc. to that VM within internal network that has internal ip.
Hope that gives you an idea.
 
Last edited:
Ok... so I forward port 22 in router to one specific VM like 192.168.1.x, do I have to forward a separate port to all individual VMs? I think Im missing something important. Does the difficulty lay in the fact that Im using a home router setup with only one ip from my isp? Will shorewall allow me to forward incoming on one port through my router then distribute to individual VMs? I don't really want to have a bunch of ports open on my router.

Incidentally, how do I, or clients if I had any, access a vm from private network and not through proxmox server web interface vnc? Do I need some sort of vnc on each computer on the private network or does each user need to go through the web interface? Basically, Id like to access directly from browser.

BTW, I plan on writing a guide for the basics of the basics when I eventually get this all down.

addendum: I think I see the disconnect, I was under the impression that I could access each VM directly like a virtual desktop. Is this incorrect? I was hoping to use several VMs at the same time from different tabs in my browser.
 
Last edited by a moderator:
Ok... so I forward port 22 in router to one specific VM like 192.168.1.x, do I have to forward a separate port to all individual VMs? Yes you must. For each port and also port for each VM IP'S.

I think Im missing something important. Does the difficulty lay in the fact that Im using a home router setup with only one ip from my isp?
I do not think that would be a problem. As long as you router supports forwarding features.

Will shorewall allow me to forward incoming on one port through my router then distribute to individual VMs? I don't really want to have a bunch of ports open on my router.
Probably yes. Shorewall will do. If you want that port to be accessable from internet, you need modification in your router.

Incidentally, how do I access a vm from private network and not through proxmox server web interface vnc? Do I need some sort of vnc on each computer on the private network or does each user need to go through the web interface? Basically, Id like to access directly from browser.
As far as l Konw, proxmox does not support VM based only management web interface.
BTW, I plan on writing a guide for the basics of the basics when I eventually get this all down.
Wish you a good Luck :)
 
One last question.... I haven't arranged the port forwarding yet but I cant seem to establish a connection with VMs from private network. Any ideas?

Thanks.