Re: NAT out to two DSL modems
On 20 Lug, 10:15, rogo...@gmail.com (Ben Harper) wrote: Thanks! On Tue, Jul 19, 2011 at 4:42 PM, Stuart Henderson s...@spacehopper.orgw= rote: On 2011/07/19 06:49, Ben Harper wrote: Hi, I'm trying to NAT out to two DSL modems. I have three network cards on three subnets: re0: 192.168.4.0/24 =A0 =A0 =A0 =A0 Internal re1: 41.134.100.222/29 =A0 =A0DSL_A re2: 10.10.10.5/24 =A0 =A0 =A0 =A0 =A0 DSL_B I can NAT out to either re1 or re2, but I have to make my default gateway point to the relevant gateway on that network. How can I tell the route tables or the nat-to command what the gatewa= y machine is? So I can do this, but ***only if my default gateway is 41.134.100.217*** (which is the gateway for that net): pass out on re1 proto tcp from 192.168.4.0/24 to any nat-to re1 Likewise, I can do this, but once again, ***only if my default gatewa= y is 10.10.10.1*** (which is the gateway for that net): pass out on re2 proto tcp from 192.168.4.0/24 to any nat-to re2 I believe I should be able to make this work without ANY default gateway. But then where do I tell the system what these two gateway machines are? You need *A* default gateway, but it doesn't matter which you choose. Then use route-to {41.134.100.217@re1, 10.10.10.1@re2} to redirect traffic and nat-to rules for outbound traffic on the relevant interface= s. You also need similar tricks with reply-to if you want to accept incoming traffic and make sure replies go out the correct interface. I have the same problem, but my one of my internet connection has static ip and gateway, the other has dynamic ip, this solution work for me too? Thanks, Elerdin.
NAT out to two DSL modems
Hi, I'm trying to NAT out to two DSL modems. I have three network cards on three subnets: re0: 192.168.4.0/24 Internal re1: 41.134.100.222/29DSL_A re2: 10.10.10.5/24 DSL_B I can NAT out to either re1 or re2, but I have to make my default gateway point to the relevant gateway on that network. How can I tell the route tables or the nat-to command what the gateway machine is? So I can do this, but ***only if my default gateway is 41.134.100.217*** (which is the gateway for that net): pass out on re1 proto tcp from 192.168.4.0/24 to any nat-to re1 Likewise, I can do this, but once again, ***only if my default gateway is 10.10.10.1*** (which is the gateway for that net): pass out on re2 proto tcp from 192.168.4.0/24 to any nat-to re2 I believe I should be able to make this work without ANY default gateway. But then where do I tell the system what these two gateway machines are? Thanks, Ben
Re: NAT out to two DSL modems
On 2011/07/19 06:49, Ben Harper wrote: Hi, I'm trying to NAT out to two DSL modems. I have three network cards on three subnets: re0: 192.168.4.0/24 Internal re1: 41.134.100.222/29DSL_A re2: 10.10.10.5/24 DSL_B I can NAT out to either re1 or re2, but I have to make my default gateway point to the relevant gateway on that network. How can I tell the route tables or the nat-to command what the gateway machine is? So I can do this, but ***only if my default gateway is 41.134.100.217*** (which is the gateway for that net): pass out on re1 proto tcp from 192.168.4.0/24 to any nat-to re1 Likewise, I can do this, but once again, ***only if my default gateway is 10.10.10.1*** (which is the gateway for that net): pass out on re2 proto tcp from 192.168.4.0/24 to any nat-to re2 I believe I should be able to make this work without ANY default gateway. But then where do I tell the system what these two gateway machines are? You need *A* default gateway, but it doesn't matter which you choose. Then use route-to {41.134.100.217@re1, 10.10.10.1@re2} to redirect traffic and nat-to rules for outbound traffic on the relevant interfaces. You also need similar tricks with reply-to if you want to accept incoming traffic and make sure replies go out the correct interface.