1

I brought a new server with one static IP. So My problem is - I don't have extra static IP service providers charging me very high amounts. So, Inside ESXi I'm running one Ubuntu server so is it possible to connect Ubuntu server direct via ssh using port forwarding on ESXI.

Internally I have created a simple Vulnerable Lab for Exploitation.

I don't have much idea about this ESXi Server please help me.

If anyone knows please tell me. How to get internet connection on Ubuntu server and ssh port forwarding.

Thanks !!

2
  • 1
    As a fellow ESXi noob, I can assure you that you can't simply use one static IP with an ESXi setup. The problem is that ESXi is not a router itself, and it won't do any sort of routing for you. All it'll do is connect the NIC to a virtual machine. It's pretty inflexible. You'd either have to use a hardware router in front of ESXi, or get a minimum of two different separately routable public IPs allocated to the ESXi box (one for ESXi and one for the guests). Jan 3, 2013 at 13:38
  • If you know what you are doing, you can install pfsense (or another firewall istribution) in a small VM, and then set that VM to your public IP as it's WAN (internet) address. You make another "virtual switch" in VMwware first, and set the connect the LAN interface of your pfsense to the virtual sense. You can then use NAT, DHCP, port forwarding, etc.
    – Noah
    Mar 17, 2015 at 9:22

4 Answers 4

1

Purchase a router and place it in front of the ESX system facing the internet with your one IP. Configure the router to handle port forwarding/NAT for the network. Even a home router will do this but perhaps not best for a system that needs 7X24 uptime

1

If you know what you are doing, you can install pfsense (or another firewall istribution) in a small VM, and then set that VM to your public IP as it's WAN (internet) address. You make another "virtual switch" in VMwware first, and set the connect the LAN interface of your pfsense to the virtual sense. You can then use NAT, DHCP, port forwarding, etc. Make sure you set the pfsense VM to boot up automatically with the host. Once you are very sure it's working, and have someone wherever your computer is to support you if it doesn't work, you can switch the management interface of VMware over to the internal segment (which can be a 10.0.0.x address or whatever).

You can set your pfsense to port forward the VMWare management ports from the outside IP so that you can still connect "directly" to the outside IP to manage your VMs. You can also simply not do this, and only be able to manage your VMWare from a VM with the vSphere client installed or something.

What makes this solution is that if your pfsense ever stops working, you will lose access to VMWare, since it only has an internal IP. If you have physical access, I recommend this solution. (Of course you can use a real router instead of an appliance if you like).

Another, simpler solution, you can leave your VMware server on a public IP - if you just need SSH, is that you just enable SSH on ESXi, and SSH into the ESXi server, and then from there run SSH and SSH into your Linux VM, which can be on a private IP. Even in this case, if you want your VM to have internet access, you will still have to have a router or proxy of some sort running in a VM, which will need an IP.

0

My understand your concern is the high charge for a static IP. well, if you already have a statis public IP. and of course you have a modem, you need to drop a line from the modem to a switch, then one line from your switch to your LAN, and one line to your ESX LAN through router such as juniper firewall. how to setup an ESX LAN is another story. Note: ESX LAN could be a different name. used ESX just as example.

1
  • Although I understand what you're saying, I don't think this answers the OP's question as to how he gets an internet connection and ssh forwarding to his VM... at least not specifically.
    – JoshP
    Jan 3, 2013 at 20:44
0

Jeckor, In my environment, the ESXi host, an ESXi admin computer, and the external network POP (i.e. Internet connection) are connected to a small network switch. The ESXi Host and the admin PC have addresses in the class C (non-routable) IP address range, and the VMs have IP addresses in the class A (public) range. ESXi enables the host and the VMs to share the NIC. I'm lucky because each VM has an address in the A range and can communicate through the POP connection. If they didn't... I'd build a VM to be a proxy/NAT server, with the IP address provided by the ISP. Then configure the other VMs to use that server to proxy their external connection. You should probably use IP addresses in another class C network for the VMs and an additional IP address on the proxy server virtual NIC. No additional hardware required, but a little learning curve if not familiar with networking and proxy.

The first part of this works in production. The second part works on the whiteboard of my mind :) Good Luck!

You must log in to answer this question.

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