How to... 1 IP... 3 or 4 MV like Independent?

KatiaSishost

Member
Jun 22, 2020
15
0
21
34
Hello, I am building a homelab for testing and incidentally setting up virtual machines for testing ... for now I have the server (HP ProLiant) connected to a router on NIC1 ... with IP 192.168.1.200
NIC2 not connected

Mount a CT .. with IP 192.168.1.201 and install the CWP (CentOS WebPanel ... Like CPanel) where I have 3 web pages ... 1 my personal blog ... and 2 extra web pages that you can use to upload files and the rest ...)

Mount another (192.168.1.202) CT that you use to program a Home Automation system for my house, the same one you use in a Python + Apache system.

and in the 3rd (192.168.1.203) CT I want to set up a soft chat server for my work and the web (in development mode)

In the router, set the DMZ to 192.168.1.201 (CWP) and I can access from the outside with all the domains registered there.

But how can I access the other CTs or MVs from the outside for the same ports? through your domain?

example ... 3erct.com access 192.168.1.203

From outside the network on the Internet as if it were an independent machine? so I could give my colleagues access to be able to access it directly without interfering with my other MVs or CTs.


and .. what about for example the email server ... since they all have an email server



Sorry for my bad english .... im spanish :D

Best Regards!
 
Last edited:
You do need to setup a reverse proxy on one machine that will then forward requests to the actual machines. This is usually done depending on the domain.

So you can setup multiple (sub) domains and all point to the reverse proxy.

There are plenty of guides on how to set up reverse proxies. It depends which reverse proxy you like most. A lot of Webservers can act as reverse proxies.
 
This is done with NAT (network address translation). It translates the internal IP and its ports to your external IP. You can have any number of internal "hidden" VMs with different services and NAT will translate this to the external "public" IP. This can be done either via iptables, nftables or even better with a router VM like OPSense or pfSense