Forum Discussion

Juha_Metsansalo's avatar
Juha_Metsansalo
Icon for Nimbostratus rankNimbostratus
Sep 04, 2007

IP based rule for outgoing smtp traffic

We are trying to write an IP based rule for outgoing smtp traffic, so that smtp traffica from our customers networks will be deliverd to dedicated virtual server and the other mail traffic will just delivered to our queue server (both are virtuals in bigip).

 

 

I think that it will be quite simple, but any hints will be appreciated.

 

 

  • Do you liket to modify the IP packet or only move the traffic between two different virtual server? You must be more clear about the description of your problem.

     

     

    What is a brief of your network diagram?
  • Is there mistake between terms virtual server and pool?

     

     

    If the case is to direct traffic between pools based on the client IP-address the iRule would look like this:

     

     

    when CLIENT_ACCEPTED {

     

    if { [matchclass [IP::remote_addr] equals $::allowed_smtp_clients] } {}

     

    pool smtp_pool_1

     

    } else {

     

    pool smtp_pool_2

     

    }

     

    }

     

     

    This iRule is using address data group named allowed_smtp_clients and based on wheter the client-IP is on this data group moves traffic to pool1 or pool2.

     

     

    Data Group: allowed_smtp_clients

     

     

    class allowed_smtp_clients {

     

    host 192.168.0.22

     

    host 192.168.0.30

     

    network 192.168.1.0/24

     

    }

     

     

    Hope this was what you were looking.