Need help on load balancing
Hi,
I am new to list and have an urgent question. I read the LARTC howto
and enter the following commands but I don't know how to use nat for internal network. I want that all of the clients that have IP in range 192.168.2.0/24 and gateway 192.168.2.1 can see internet using both uplinks with failovr feature. What is the nat command that I have to enter?
Eth0: 192.168.2.1/24 ( internal network )
Eth1: 80.191.30.250/30 ( ISP1 )
Eth2: 213.217.54.245/29 ( ISP2 )
----------------------------------------------
ip route add 80.191.30.248 dev eth1 src 80.191.30.250 table isp1 ip route add default via 80.191.30.249 table isp1
ip route add 213.217.54.240 dev eth2 src 213.217.54.245 table isp2 ip route add default via 213.217.54.241 table isp2
ip route add 80.191.30.248 dev eth1 src 80.191.30.250
ip route add 213.217.54.240 dev eth2 src 213.217.54.245
ip rule add from 80.191.30.250 table isp1
ip rule add from 213.217.54.245 table isp2
ip route add 192.168.2.0/24 dev eth0 table isp1
ip route add 213.217.54.240/29 dev eth2 table isp1
ip route add 127.0.0.0/8 dev lo table isp1
ip route add 192.168.2.0/24 dev eth0 table isp2
ip route add 80.191.30.248/30 dev eth1 table isp2
ip route add 127.0.0.0/8 dev lo table isp2
ip route add default scope global nexthop via 80.191.30.249 dev eth1 weight 1 nexthop via 213.217.54.241 dev eth2 weight 4
----------------------------------------------------------
Please help me.
Thanks,
Saeed Zamani,
Technical Manager,
Concept FZ LLC.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi all,
Simple, in the iptables you must have two rules for example:
iptables -t nat -A POSTROUTING -o eth1 -s IP_RANGE -j SNAT --to IP_EXTERNAL_1
iptables -t nat -A POSTROUTING -o eth2 -s IP_RANGE -j SNAT --to IP_EXTERNAL_2
or if you like you may delete the -s IP_RANGE also.
[]'s
Anderson
Quoted 3 lines
Hi,
I am new to list and have an urgent question. I read
the LARTC howto
Quoted 1 line
and enter the following commands but I don't know how t
o use nat for
Quoted 1 line
internal network. I want that all of the clients that h
ave IP in range
Quoted 1 line
192.168.2.0/24 and gateway 192.168.2.1 can see internet
using both
Quoted 1 line
uplinks with failovr feature. What is the nat command t
hat I have to
Quoted 6 lines
enter?
Eth0: 192.168.2.1/24 ( internal network )
Eth1: 80.191.30.250/30 ( ISP1 )
Eth2: 213.217.54.245/29 ( ISP2 )
----------------------------------------------
ip route add 80.191.30.248 dev eth1 src 80.191.30.250
table isp1
Quoted 2 lines
ip route add default via 80.191.30.249 table isp1 ip route add 213.217.54.240 dev eth2 src 213.217.54.245
table isp2
Quoted 4 lines
ip route add default via 213.217.54.241 table isp2 ip route add 80.191.30.248 dev eth1 src 80.191.30.250 ip route add 213.217.54.240 dev eth2 src 213.217.54.245 ip rule add from 80.191.30.250 table isp1
Quoted 8 lines
ip rule add from 213.217.54.245 table isp2
ip route add 192.168.2.0/24 dev eth0 table isp1 ip route add 213.217.54.240/29 dev eth2 table isp1 ip route add 127.0.0.0/8 dev lo table isp1
ip route add 192.168.2.0/24 dev eth0 table isp2 ip route add 80.191.30.248/30 dev eth1 table isp2 ip route add 127.0.0.0/8 dev lo table isp2
ip route add default scope global nexthop via 80.191.30
.249 dev eth1
Quoted 2 lines
weight 1 nexthop via 213.217.54.241 dev eth2 weight 4
-------------------------------------------------------
---
Quoted 11 lines
Please help me.
Thanks,
Saeed Zamani,
Technical Manager,
Concept FZ LLC._______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: ht
tp://lartc.org/
Quoted 1 line
__________________________________________________________________________
Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/