How can I access multiple computers in my home network ?

ni4ni1

Junior Member
Jan 31, 2016
2
0
0
Hello

I recently set up a vmware server that runs several virtual Linux machines.
They all have fixed IP addresses (I run a router with openWRT).

Now I want to be able to access them from the internet. There are plenty of guides how to access your router and then use port forwarding to redirect your traffic to one of your computers. But what if I have multiple computers ?

Lets say I want to be able to ssh my computer, so I add a line in the port forwarding saying that all the traffic on port 22 should be redirected to port 22 of host1. This is all nice.
But what it I have 5 different hosts in my network that I want to be able to ssh to ?
How can this be achieved ? when accessing my router's address from the internet I cannot specify the internal host name or IP address...
How do I do that ? Should I use a VPN server ? (I prefer not to).

Thank you

Guy Shilo
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
You can set up port forwarding to different hosts:

So, on your router, your set port 22 to be forwarded to SERVER1 port 22 for SSH; you set port 10022 to be forwarded to SERVER2 port 22 for SSH, port 20022 to be forwarded to SERVER3 port 22, etc.

You then specify the correct port number in your external connection. So: ssh my-external.ip.com:22 for server1, ssh my-external.ip.com:10022 for server2, etc.

If you have a lot of servers with lots of services, then it may be easier to set up a VPN. This is what I ended up doing on my home LAN. Installed openswan on one of the boxes, then I can just tunnel into the LAN from anywhere and get full local access to the servers.