Forum Discussion

Mike_Sullivan_2's avatar
Mike_Sullivan_2
Icon for Nimbostratus rankNimbostratus
Feb 27, 2008

LB outbound service across multiple ISPs

Greetings,

I have a link controller v9.4.1. Outgoing email should snat to our public MX records (one in each ISP's block). So I setup a VS enabled on the internal vlan that accepts connections from the firewall. So here it is:


virtual Outbound_Mail {
   snat automap
   pool Default-GW
   destination 10.100.128.6:25
   ip protocol 6
   vlans internal enable
   persist Dest
}

The Default-GW pool contains members defining each ISP link. Fine, now I need an irule to snat it to the public MX record and this is where I get a little fuzzy. I think I need to be catching the LB_SELECTED event, like this:


when LB_SELECTED {
    if { [IP::addr [IP::remote_addr] equals "1.2.3.4"] }{
        snat 1.2.3.myMx1
    } elseif { [IP::addr [IP::remote_addr] equals "2.2.3.4"] }{
        snat 2.2.3.myMx2
    } else {
         something is wrong here
        log local0. "some useful info"
        reject
    }
}

Then tie this to the Outbound_Mail VS. Is this correct or is there something I'm missing?

Thanks for you input.

2 Replies

  • Hi,

     

     

    you can use snatpool instead of irule. create a snatpool with all the public MX record as snatpool members. associate this snatpool with Outbound_Mail virtual server.

     

     

    regards,

     

    KY