Forum Discussion
Shane_Terrick_9
Nimbostratus
Dec 18, 2012iRule to block blank username/password
Newbie to iRules here so please go easy.
I have been assigned a project to work with one of our applications that now wants to load balance thru our F5 (Gtm WIP and LTM VIP), but they als...
El_Jefe
Nimbostratus
Dec 18, 2012Shane - With what you've given us, I can't really tell what you're doing. If you're using HTTP Basic Auth it could be as simple as -
You basically have to parse the username and PW, and figure out when null values come in, and then either drop the request or reject it.
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: User-Agent: [string tolower [HTTP::header "User-Agent"]] requested [HTTP::host][HTTP::uri]"
if { [string tolower [HTTP::username]] eq ""} {
log local0. "[IP::client_addr]:[TCP::client_port]: Rejected request"
reject
}
}
FYI - this is just an example off the top of my head. Haven't even checked syntax.
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