I am setting up a Linux server (CentOS) to act as a router with load balacing and failover (when one internet line is down, another one should take over). The clients conected to eth1 ( LAN ) should be able to access the internet.
My reference ( http://fatalsite.net/?p=90 )
Interfaces :
eth1 = LAN
eth2 = WAN1 - 192.168.1.100 / gateway 192.168.1.1 - ISP1
eth3 = WAN2 - 192.168.10.5 / gateway 192.168.10.1 - ISP2
How do i do that?
Thank you!
ok. so i did setup the nat and enabled forwarding, but still can reach the internet via LAN interface.
i've also did this, but no luck :
iptables -A INPUT -i eth2 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i eth3 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables --table nat --append POSTROUTING --out-interface eth2 -j MASQUERADE
iptables --table nat --append POSTROUTING --out-interface eth3 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT