Multiple Gateways and SNAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello! I have two interfaces I'm trying to load balancing over with
the gateway box doing SNAT for the LAN. 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
-
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux