Forum Discussion
redheadontherun
Nimbostratus
Jul 27, 2016Block Source IP using a blocklist hosted on a webserver
Currently we utilize a web server to host a blocklist that some of our other security devices use to block IP addresses. It allows us to maintain 1 list for all devices. Can the F5 ASM or LTM utilize...
Yann_Desmarest_
Nacreous
Jul 27, 2016Hi,
this list can be uploaded as an ifile. You can also do a lookup using sideband connections in irules
Yann_Desmarest_
Nacreous
Jul 27, 2016Here a nice article on sideband connection that can help you design a lookup using HTTP API :
Advanced iRules: Sideband Connections
- Hi,
when HTTP_REQUEST { Check the HTTP path with wildcards switch -glob -- [HTTP::path] { "/foo/*" { Remove /foo from the path by skipping one character and matching after the next / HTTP::path [findstr [HTTP::path] / 1] } } }
- just in case you want redirection.
[root@ve1023:Active] config b virtual bar list virtual bar { destination 172.28.19.79:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve1023:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if { [HTTP::uri] starts_with "/foo" } { HTTP::redirect "http://[HTTP::host][string map {"/foo" ""} [HTTP::uri]]" } } } [root@ve1023:Active] config curl -I http://www.abc.com/foo/meh/ HTTP/1.0 302 Found Location: http://www.abc.com/meh/ Server: BigIP Connection: Keep-Alive Content-Length: 0
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