Forum Discussion
I-rule not working
Hi
I have a i-rule to allow multiple ports but for some reason it's not working... i can connect on any port
when CLIENT_ACCEPTED {
if { [TCP::client_port] == 8300 or [TCP::client_port] == 8301 or [TCP::client_port] == 8401 or [TCP::client_port] == 8881 or [TCP::client_port] == 8880 or [TCP::client_port] == 8731 or [TCP::client_port] == 8732 or [TCP::client_port] == 4353 or [TCP::client_port] == 8733 or [TCP::client_port] == 8525 } {
drop
}
}
2 Replies
- What_Lies_Bene1
Cirrostratus
More than two 'or' statements really isn't manageable. Can I suggest you create a Data Group of the ports you want to deny and use this;
when CLIENT_ACCEPTED { if { [class match [string [TCP::client_port] equals denied-ports ] } { drop } } - What_Lies_Bene1
Cirrostratus
Actually, I think it should be TCP::local_port;when CLIENT_ACCEPTED { if { [class match [string [TCP::local_port] equals denied-ports ] } { drop } }
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
