For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Rick_77318's avatar
Rick_77318
Icon for Nimbostratus rankNimbostratus
Feb 05, 2008

Filter for FTP access

I am new to iRules and am porting some from 4.x to 9.x. I have the following question.

 

 

We have an FTP rule which only allows access to specified clients. In version 4.x it had no event to trigger the rule but in 9.x I believe the rule needs to be triggered by an event (is this a correct assumption?).

 

 

when XXX {

 

if {[IP:addr [IP::client_addr] equals aa.bb.cc.dd]} {

 

use pool ftp

 

}

 

else {

 

discard

 

}

 

}

 

 

What is the XXX event I should use to trigger the iRule? (USER_REQUEST?), or am I going about this the wrong way?

 

 

Thanks

2 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    you're on the right track.

    The event you are looking for is "CLIENT_ACCEPTED":

    
    when CLIENT_ACCEPTED {
      if {[IP:addr [IP::client_addr] equals aa.bb.cc.dd]} {
        use pool ftp
      } else {
        discard
      }
    }

    /deb