Well, the ideia is make an ip load balancing with 3 links (no need to be perfect, we can lose some time for the route cache) I dont know if there is a way to make it, but... 2 of then (200.213.48.24 and 200.213.48.26) have the same gateway (200.213.48.1) the second (will be the redundant) has IP 200.102.250.114 with gateway 200.102.250.113 The first 2 ips need to portforward some ports to different machines, like 200.213.48.24:25 goes to 192.168.0.3:25 and 200.213.48.26:80 goes to 192.168.0.4:80 (here i don't know if it will be a problem having the same gateway ip) The third link have to portforward all services inside the network like 25 and 80. The ideia is OR making a load balance OR adding 2 ips to the DNS. (I really dont know if it is possible... if you have any sugestions I would apreciate) -------- I'm going in parts, so first I have 2 links with different gateways and the other link is down. so I have this: ip route add 200.213.48.24 via 200.213.48.1 table T1 ip route add 200.102.250.114 via 200.102.250.113 table T2 ip rule add from 200.213.48.24 table T1 ip rule add from 200.102.250.114 table T2 ip route add default via 200.102.250.113 table T2 * The 200.213.48.24 gw is default (route add default gw 200.213.48.1) In iptables I have this: iptables -t nat -A PREROUTING -p tcp -d 200.213.48.24 --dport 25 -j DNAT --to 192.168.0.3:25 AND iptables -t nat -A PREROUTING -p tcp -d 200.102.250.114 --dport 25 -j DNAT --to 192.168.0.3:25 the route goes to the default gateway(200.213.48.1) as espected. I was thinking in a "ifping like" script to handle this problem, who knows?... TIA, Joao Reis. On Thu, 2004-07-29 at 19:57, Antony Stone wrote: > On Thursday 29 July 2004 11:50 pm, Joao Alberto M. dos Reis wrote: > > > yep > > Okay, show us your rules and the routing tables. > > Regards, > > Antony > > > On Thu, 2004-07-29 at 19:39, Antony Stone wrote: > > > On Thursday 29 July 2004 11:29 pm, Joao Alberto M. dos Reis wrote: > > > > Hi, > > > > > > > > I have the following: > > > > 1 linux box with 2 valid IPs with different gateways each. > > > > > > > > I need to port forward different ports inside my network to different > > > > machines. > > > > > > > > I have set a default gateway to the first link and created a routing > > > > table for the second link pointing to the second gateway. but when I > > > > make my portforward to this second link, the packets try to leave by > > > > the first gateway. > > > > > > > > How can I fix that? > > > > > > Did you use iproute2 rules for this? > > > > > > http://lartc.org > > > > > > Regards, > > > > > > Antony.
Attachment:
signature.asc
Description: This is a digitally signed message part