We have been attempting to setup a Linux/BSD/etc box that can behave as both an internet gateway and as a router. I don't know how to articulate our situation very well, so please forgive me...
Currently we are using Vyatta with the following network interfaces (with masked IP addresses):
eth0
-> x.x.x.178/30 - WAN (upstream router: x.x.x.177)vlan100
-> Attached toeth0
br100
-> y.y.y.1 - Bridges eth0.vlan100 and eth1eth1
-> y.y.y.y/24 - Bridged with the WAN (x.x.x.178 is the upstream router for this subnet)eth2
-> 10.10.0.1/16 - Private network, NAT through y.y.y.1
The problem is: when we set the NAT rule to route 10.10.0.0/16 traffic through br100
nothing gets routed. However, if we set the NAT rule to route through eth0
, the traffic actually routes, but now it is sourced from the x.x.x.178 address instead of the y.y.y.1 address.
What am I doing wrong here? Any thoughts or suggestions would be helpful.
Current configuration (minus some fluff):
interfaces {
bridge br100 {
address y.y.y.1/24
}
ethernet eth0 {
address x.x.x.178/30
vif 100 {
bridge-group {
bridge br100
}
}
}
ethernet eth1 {
bridge-group {
bridge br100
}
}
ethernet eth2 {
address 10.10.0.1/16
}
loopback lo {
}
}
services {
nat {
rule 1 {
outbound-interface br100
source {
address 10.10.0.0/16
}
type masquerade
}
}
}
system {
gateway-address x.x.x.177
}