Forum Discussion

lizunjjg_280139's avatar
lizunjjg_280139
Icon for Nimbostratus rankNimbostratus
Jan 30, 2019

How do you compare irules

[http::payload] includes username.$ipusername=$clientip$username if {$ipusername contains datagroup} { pool pool_test } else { reject

 

4 Replies

  • An IP address corresponds to a user name. i can find the username in payload with irules.but,I don't have the ability to match a username to an IP address.

     

  • Jnon's avatar
    Jnon
    Icon for Nimbostratus rankNimbostratus

    Still need more information, are you trying to authenticate a user by IP address? if you find the username in payload, if this is http, you can get the IP from the http header, in your example, it appears you're trying to match a user from a datagroup, which that will work, but your not very clear on what you know about the IP or what you want to do with it.