NAT functionality inside tenant
I am trying out NAT setup inside openstack tenant. Openstack details -> Icehouse with nova-networking using flatDHCPmanager (no neutron yet)
Setup is very simple -> I have 2 VM instance spawned by openstack. Following are setup details ->
VM - A -> has 1 public interfaces and 1 private ip interface
VM - B -> 1 private ip interface
I want to use VM-A as gateway for VM-B. I am installing routing rules in VM-B to use VM-A as default route for external connectivity. I am configuring SNAT using iptables in VM-A. When I am pinging external node from VM-B I see following behavior ->
- VM-B sends ping packet to VM-A
- VM-A performs SNAT changes the source address and sends it to external node
- External node sends back the response, and VM-A performs reverse NATing
- Response never reaches VM-B !
On further investigation I found that possible suspect to be ebtable rules on the compute host which are configured by nova during instance launch.
My questions is, how do I make this setup work? How to make one of the VM as default GW + NAT for other VMs within the tenant ?