I've got some Xen hosts configured in bridged mode, whose VMs use public or private IPs:
Host #1
- dom0: 3.3.3.71
- dom1: 10.0.2.10
- dom2: 3.3.3.85
- dom3: 10.0.2.11
Host #2
- dom0: 3.3.3.72
- dom1: 3.3.3.86
- dom2: 10.0.2.12
- dom3: 10.0.2.13
Host #3
- dom0: 3.3.3.73
- dom1: 10.0.2.14
- dom2: 10.0.2.15
- dom3: 3.3.3.87
VMs with public IPs (3.3.3.*) are reachable from the Internet. VMs with private IPs are reachable from within each other, and this is a desired behaviour. However, they can't reach the Internet because there's no 10.0.2.1 gateway in the local subnet. How can I fix this?
One solution would be to configure one server with a 10.0.2.1 interface to act as a NAT. However I don't want any SPOF and I'd like each host to do its own NAT using the public IP address assigned to the dom0.
I believe this is just a matter of configuring iptables in the dom0's. If this is correct, how?