2

I newly got an Gen8 HP server. I have 3 virtual machines (Debian 10) on ESXi 6.7 which are locally connected with some internal/private IPs like 192.168.0.101 and 102 and 103. Suppose I have one public IP to connect to my ESXi from browser having no problem and I have another public IP which is assigned to VM-1 and can be connected through SSH from any where.

The problem is : I want to connect through SSH to my VM-2 by something like putty/Winscp/dbForgeStudionMysql/ and etc!! Is it possible to get access to VM-2 and VM-3 without having a public IP?

How can I do that?

3
  • As this is for a home setup I would advice you to ask your question at the superuser forum instead. But in short: Of course you can. How else do you think anybody gets anything done with VMware products. The documentation and how-tos are easily available from VMware and on literally hundreds of private blogs.
    – Mikael H
    Apr 21, 2021 at 5:19
  • It seems you mix what does mean when we say IP address is static/dynamic or public/private. Those properties are orthogonal, there may be four combinations. It looks like your servers already have statically assigned private IPs, and you know which ones. What you wanted to ask is how to connect to these private IP from outside provided you have some system with public IP in front of them. You have to employ NAT, but I have a strong doubt that ESXi is capable to do that, being so heavily stripped down. Use a dedicated router instead (probably virtual too), with public IP. Apr 21, 2021 at 5:45
  • Nikita Kipriyanov, thanks for guidance. I have 8 VM machines and I do not want to pay for static IP for all of them for being connected from home/every where. Suppose all IPs are public! Now need to some key word to find a way to copy some files for example, from my desktop to VM-3, with no Static IP ! Suppose ESXi and VM-1 have Static IPs and others local IPs and all are in a local network, Apr 21, 2021 at 6:04

1 Answer 1

1

I insist on correct terminology. static or dynamic is how you configure IP address to the machine (in the config file, via DHCP or whatever). public or private is which class this address belongs to, these classes are defined by IANA, in particular private addresses are defined in the RFC1918.

You still call public address static, ignoring that I corrected you in the comment up there. This is disappointing. My next communication will assume if you say static you meant static, so better refer to things correctly.

Nobody taxes for staticness or dynamicness of address, because it is silly and stupid. But the world is short on globally routable ("public") IPs and so these are costly nowadays, so I understand your desire to minimize their usage.

I recommend to always have a dedicated public IP on the virtualization host system, for it to be accessible always, and another one for its BMC (iLO in your case), it may save you a lot of hassle when you have problems with hypervisor or drives or RAID another core hardware. And then you'll need at least one another (third) public IP address for the virtual router, which will do NAT for the rest.

If you want to dedicate VM-1 to be your router with NAT, it must have two vNICs, one with public IP towards internet and the other in the virtual network together with other virtual machines. Other machines must have only one vNIC towards private NIC of the router VM-1; configure them so their default gateway will be private IP of the VM-1.

Now, treat it like an ordinary software router; I'd install Linux on it and do usual NAT with iptables. You also may use it as VPN endpoint, it'll be desired in some cases. There are plenty of manuals on this topic on the Internet, including ServerFault.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .