Forum Discussion
Trying to get the Syntax right.
So I am trying to get an iRule that allows only servers I approve of on the VIP. So I created a class named allowed_servers and if the IP doesn't match that list I want the VIP to drop the connection.
So this is what I came up with but the iRule editor always tells me that "line 2: [parse error: PARSE missingBracket 28 {missing close-bracket}] [{[class matches [string[IP::client_addr] not equals allowed_servers]}]"
I can't find where I am supposed to put that close-bracket, can anyone help?
when CLIENT_ACCEPTED {
if {[class matches [string[IP::client_addr] not equals allowed_servers]}
{drop}
}
Thanks,
Ken
2 Replies
- hoolio
Cirrostratus
Hi Ken,
That's close. Here you go:when CLIENT_ACCEPTED { if { not [class match [IP::client_addr] equals allowed_servers]}{ drop } }
Aaron - coda6_52611
Nimbostratus
Thank you, the iRule editor likes that much better.
I appreciate the help.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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