Results 1 to 1 of 1
Hello! I have two interfaces I'm trying to load balancing over with the gateway box doing SNAT for the LAN. Here are the rules I've setup so far. The problem ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-17-2007 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 1
Multiple Gateways and SNAT
Hello! I have two interfaces I'm trying to load balancing over with the gateway box doing SNAT for the LAN. Here are the rules I've setup so far. The problem is packets try to go out on the eth2 interface with the external IP address of eth1 even though I've definied the routing rule. Any ideas?? Thanks
iptables -t nat -A POSTROUTING -o eth2 -j SNAT --to 12.23.32.15
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 34.36.23.89
ip route add default scope global nexthop via 12.23.32.1 dev eth2 weight 1 nexthop via 34.36.23.1 dev eth1 weight 1
ip rule add from 12.23.32.15 lookup 200
ip rule add from 34.36.23.89 lookup 201
ip rule add default via 12.23.32.1 dev eth2 tab 200
ip rule add default via 34.36.23.1 dev eth1 tab 201


Reply With Quote
