Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a 12.04 Ubuntu server set up as a VM on an esxi host, and I have m0n0wall running as another VM as my firewall. I can't figure out how to use NAT to make the traffic that hits my public IP, get the information of the private IP of the server. Please let me know if you need anymore information, but I'm starting to get frustrated and just want this to work so I can switch servers. Thanks so much!

share|improve this question
    
So you want to forward traffic that hits your m0n0wall host on port 80 to your ubuntu vm? –  fuero Jan 26 '13 at 2:06
    
Yes, currently I have an A Record that forwards traffic from my domain name to the public IP, and I want that to go to my Ubuntu VM –  bhooks Jan 26 '13 at 2:07

1 Answer 1

Your setup description is somewhat vague, perhaps this general overview of how I'd do things could help you.

  • m0n0wall with two vNICs, one to talk to the outside world, one to talk to Ubuntu
  • m0n0wall would use vNIC0 (outside world) as it's RED interface, vNIC1 (ubuntu) as it's GREEN interface (or PURPLE if you want to go levels of complexity deeper)
  • m0n0wall would use vNIC0 as it's WAN, and connect vNIC1 to the LAN

Then just configure m0n0wall as you would normally for a router, and specify your NAT configuration as such. The two NICs would need to be different virtual networks, with the second network (without a physical nic assigned) using the "GREEN" IP of m0n0wall as the Gateway IP (if you want to have a VMkernel interface on GREEN).

You're effectively setting up a virtual WAN/LAN environment inside vSphere. If you have any questions about implementation just comment, I'm happy to help! I'm learning ESXi for work, personally, and I'm always burning through unusual scenarios in my home lab.

share|improve this answer
    
I didn't set up the server, but we already have 3 NICs set up, labeled as VM Network, Internet and internal. I have my Ubuntu VM set to the VM Network –  bhooks Jan 26 '13 at 2:23
    
That's probably your issue. You want m0n0wall to have access to VM Network/Internet (whichever is connected to the rest of your network / the edge modem/router device) and Internal, then Ubuntu connected only to Internal. I'm not sure if you're familiar with networking design, but you'd effectively do: WAN -> Router / Switch -> ESXi (over VM Network / Internet) -> m0n0wall VM -> Ubuntu VM. –  Scott Stamp Jan 26 '13 at 2:30
    
I'm not sure if you're in a secure environment but if you'd like I'd be happy to help you over a remote session. Time to kill tonight anyways. –  Scott Stamp Jan 26 '13 at 2:30
    
Sure, send me an email @ bhooks1234@gmail.com and we can talk –  bhooks Jan 26 '13 at 2:43
    
Please don't listen to what Scott Stamp says, I let him look at my configuration and poke around at a few things to see if he could fix my issue and now he has completely messed it up and since my server is co-located I have to drive out an hour to reset it or wait over the weekend for someone to be there to fix it. Please be 100% sure of what you are doing and saying before you help anyone else –  bhooks Jan 26 '13 at 3:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.