Forum Discussion

iamjepoy2k16_26's avatar
iamjepoy2k16_26
Icon for Nimbostratus rankNimbostratus
Apr 04, 2019

Irule : Filtering source ip and redirecting it to specific node and disabling the snat

Im relatively new in creating an iRule . We have a requirement where we need to filter a specific host ip and when it hits the vip, it will be redirected to a specific node . Additional requirement is that the irule should disable the snat once the source ip hits the specific node. I dont know how feasible are these . Thanks in advance

 

1 Reply

  • Hi iamjepoy2k16,

    an iRule to overwrite the server-side node address and SNAT settings for a specific client IP will look like this...

    when CLIENT_ACCEPTED {
        if { [IP::client_addr] eq "1.1.1.1" } then {
            node 2.2.2.2
            snat none
        }
    }
    

    Note: If you use route domains you have to suffix the IPs with your route domain id (e.g.

    1.1.1.1%2
    )

    Cheers, Kai