Title: URGENT HELP needed!! Problem with second route dual ISP

Below is a snippet from my firewall script
isp1_ip="xx.0.5.20"
isp1_gw="xx.0.5.1"
isp1_net="xx.0.5.0/28"
isp1_if="eth2"

    isp2_ip="xx.182.19.88"
    isp2_gw="xx.182.19.1"
    isp2_net="xx.182.19.0/28"
    isp2_if="eth3"
    lo_ip="127.0.0.1"
    lo_if="lo"
    lo_net="127.0.0.1/8"
    ip rule delete from $isp1_ip
    ip rule delete from $isp2_ip
    ip route delete table 5 # isp 1
    ip route delete table 7 # isp 2
    ip route del default via $isp2_gw dev $isp2_if
    ip route flush cache
    #ip route default nexthop via $isp2_gw nexthop $isp1_gw
    #ip route add default nexthop via $isp2_gw dev $isp2_if weight 2\
    # nexthop via $isp1_gw dev $isp1_if weight 1
    echo "Adding routes ..."
    ip route add $isp1_net dev $isp1_if src $isp1_ip table 5
    ip route add default via $isp1_gw table 5
    #ip route add $lan_net dev $lan_if table 5
    #ip route add $isp2_net dev $isp2_if table 5
    #ip route add $lo_net dev $lo_if table 5
    ip route add $isp1_net dev $isp1_if src $isp1_ip
    ip route add $isp2_net dev $isp2_if src $isp2_ip
    ip rule add from $isp1_ip table 5
    ip rule add from $isp2_ip table 7
    ip route add $isp2_net dev $isp2_if src $isp2_ip table 7
    ip route add default via $isp2_gw table 7
    ip route add $lan_net dev $lan_if table 7
    ip route add $isp1_net dev $isp1_if table 7
    ip route add $lo_net dev $lo_if table 7
    ip route add default scope global nexthop via $isp2_gw dev $isp2_if \
    weight 200 nexthop via $isp1_gw dev $isp1_if weight 1
    ip route flush cache
    echo "Starting firewall ..."
    mail/http connections to $isp1_ip fails. Why is this?
    I want to be able to connect to both ISP and fail over to ISP1 when ISP2 is down.
    Thanks


Gareth Segree
mailto:[EMAIL PROTECTED]
Technical Support Analyst
The Gleaner Company Ltd.
7 North Street
Kingston
Tel: 922-3400

Reply via email to