sirjay
Contributor
Contributor

How to port forwarding for network adapter on Virtual Machine?

I installed clean ESXi 6.5

Then I installed Windows 7 as Virtual Machine

In settings I added some network adapters, for example 192.168.0.101, 192.168.0.102

Let 192.168.0.199 to be ESXi address

How to make port forwarding in my router for external access to 192.168.0.101, 192.168.0.102?

It seems that router does not see that IPs

In routers settings I added 192.168.0.199 with 443 port – so I can access ESXi Web UI from external

If I add network adapters IP like this, I can not access

But in my local network I can access to 192.168.0.101, 192.168.0.102 – I can ping them

Firewall turned off in Windows 7

I can also access to Microsoft Remote Desktop in my home network (at 192.168.0.101 for example)

So, how to fix this?

How to access to Remote Desktop from outside?

Maybe I should add additional settings?

Thank you

Screen Shot 2019-01-26 at 14.00.58.png

0 Kudos
3 Replies
daphnissov
Immortal
Immortal

It looks like you're attempting to access the ESXi web UI. Your router is doing PAT (port address translation) if you're on a residential connection and only have a single public IP. In your router rule, you need to specify the IP address of ESXi's management vmkernel interface, not of any virtual machine you have installed. That said, let me state this very clearly:  What you're attempting to do is a very bad idea. ESXi/vCenter should never be made publicly available on the Internet, regardless of your reasons and use case as this is not how they're designed to be used and could very well be breached.

0 Kudos
sirjay
Contributor
Contributor

Thank you for reply @daphnissov

Yes, I have a residential connection and only have a single public IP.

> ESXi/vCenter should never be made publicly available on the Internet

That is what I exactly need for my goals, because I am creating proxy server and need access outside.

Also, I want access to Guest OS (Windows) with Microsoft Remote Desktop from any point.

If I don't manage this with built-in tools in ESXi, I will have to use 2nd computer and create OpenVPN to share network – but this is not the best solution.

> you need to specify the IP address of ESXi's management vmkernel interface, not of any virtual machine you have installed

How to do that or where can I read this? On screen below as I guess this is vmkernel interface. So how to connect each address of Virtual Machine with public IP for port forwarding?

As I said in first message, I have specified only 192.168.0.199:443 – ESXI Web UI interface, but I don't know how to specify vmkernel and what to type.

Screen Shot 2019-01-27 at 11.47.01.png

Screen Shot 2019-01-27 at 11.50.56.png

Screen Shot 2019-01-27 at 11.51.09.png

0 Kudos
a_p_
Leadership
Leadership

As I said in first message, I have specified only 192.168.0.199:443 – ESXI Web UI interface, but I don't know how to specify vmkernel and what to type.

Disregarding security, port forwarding to a virtual machine is not different than what you've already done for the ESXi host (UI).

For RDP access to a VM you'd forward external traffic to a given port to the VM's IP address on port 3389. Depending on the RDP version you may need to forward UDP in addition to TCP traffic.

André

0 Kudos