Forum Discussion
N_Int_282362
Feb 15, 2018Nimbostratus
IPBlacklist check with iRules
I have list of IP addresses in Data group called "BlackListIP" and it defined as "String" type instead of "Address" like
"name": "1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6"
And I hav...
Richard__147088
Mar 19, 2018Nimbostratus
Try splitting the client ip address on the %. The address has a % at the end. That might cause the lookup failure. Also, I used equals instead of contains. Hope this helps.
when CLIENT_ACCEPTED {
set client_ip [getfield [IP::client_addr] "%" 1]
if { [class match $client_ip equals BlackListIP ] } {
reject
}
}
Also, please have a look at Kai Wilke's answer in this thread : https://devcentral.f5.com/questions?pid=48727. He did a great job helping me with a related question.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects