I am working on a setup here and have it working with one minor exception.
Devices on one side of my bridge aren't getting SNAT'd to the Internet.
The Diagram / Overview:
Primary_Network (Site_A) | | Internet ------- Linux_Bridge_GW (GW) | | Secondary/CoLo Site (Site_B)
Here is the setup:
- Site_A has all the production servers and workstations.
- Site_B has a set of servers that we would like to fail-over to and also serve our internet facing services from.
- GW has two interfaces that are trunked and carrying the appropriate VLAN traffic (allow layer-2 propagation of traffic between sites) //this all works perfectly fine.
- The problem that is being encountered is, hosts from Site_B have their default GW at Site_A (same subnet) GW does not have IPs on the VLANs that are being passed.
- All hosts at Site_A can reach the Internet without problem.
- GW has an addresses on a subnet that is ONLY for Internet destined traffic. (This was done so that Websense would not have to parse unnecessary traffic. We use this VLAN as the monitor port's source on the switch where Websense is sitting).
What I think is happening:
- Packet/Frame comes in on physdev at Site_B destined for Internet.
- Kernel sees packet, and forwards it out the other side of the bridge to that host's default GW.
- Site_A (containing core-network's Default-GW) sees that packet is destined for a host it doesn't know about, so it sends it to it's default GW (the linux bridge, since it's Internet bound).
- The kernel says "Hey, I've seen you before" and therefore doesn't do SNAT'ing on the packet and sends it out to the Internet where it's black-holed.
Why I think it's happening:
- A tcpdump on the internet facing NIC shows the packet leaving the interface with the private address as it's source.
What I would like:
- Have the packet SNAT'd.
- Something like the below would be awesome
- packet comes in from Site_B
- kernel sees that the packet is NOT destined for itself or any private address
- kernel says "OK, well since you're destined for the Internet I'm going to send you out this interface rather than forward you to your normal default GW that's WAAAY over there."
- packet comes in from internet and is sent out the appropriate bridge physdev depending on which site the host it's destined for is at.