I have a Dell PowerEdge 2950 with two NICs and I'm running ESXI 6.0. I want to use one NIC as the gateway to the Internet (DMZ) and I want to have one of my VM's bridged with this NIC so that it also uses the public IP. Is this possible and if so, how can I make it work? I've been trying to figure this out for weeks but haven't been able to get it.
What you could do is to setup a virtual machine as a NAT router/firewall (e.g. pfSense). Create a second vSwitch (without physical uplinks) to which you connect the VMs, and connect the router to this vSwitch as well as to another vSwitch with the connection to the Internet.
André
The NIC which is connected to the public WAN does not need an IP assigned to it
The switch will allow you to define the public address (IP) for the VM and as long as you have the proper subnet, and gateway defined your virtual machine will be accessible form the internet
Steps
Connect NIC2 (Lets call it WANNIC) to WAN
Assign the vSWITCH
Guest machine network should be using the VSWITCH which has be assigned to 'WANNIC'
Set IP, Subnet, Gateway (DNS if needed)
Test using tracer route
Thanks for the reply jermsmit. The only issue I have with this is that my public IP is dynamic. If it changes I need the vm IP to change as well.
This is sort of what I'm trying to do. I have a linux vm that I'm trying to use as my router/firewall but the dynamically assigned public IP that my cable modem forwards to my esxi port isn't assigning the same IP to the linux vm.
You cannot have the same IP address assigned to two devices (neither physical nor virtual). That's why you need a NAT router, which uses a dedicated public IP address, and assigns private IP addresses to internal systems/VMs.
André