Forum Discussion
vkoprivica_9683
Nimbostratus
May 20, 2013Irule - Pool port range
Hi, I need a help creating an Irule for specific pool. I have an irule named Test and I would like to have test_pool accepting only connections in the port range 1024-65535. To be cleared, only above mentioned pool needs to be affected by the irule.
Thank you.
6 Replies
- Kevin_Stewart
Employee
Are you referring to the local (source) port?when CLIENT_ACCEPTED { if { [expr [TCP::client_port] < 1024] or [expr [TCP::client_port] > 65535] } { reject } }
The above will block any connection request that has a source port less than 1024 and greater than 65535, though you'd probably be better off applying a packet filter. - vkoprivica_9683
Nimbostratus
Does this apply to all pools or just one? - Kevin_Stewart
Employee
The iRule is attached to the virtual server, so it would affect any pool that is either statically or programmatically assigned to the same virtual server. - vkoprivica_9683
Nimbostratus
Kevin, can I allow port 135 in the same irule or I need to crate a new vip to allow that traffic too? - Kevin_Stewart
Employee
Yes, but it'd be easier I think to modify the logic a little bit.when CLIENT_ACCEPTED { if { ( [expr [TCP::client_port] > 1024] and [expr [TCP::client_port] < 65535] ) or ( [TCP::client_port] == 135 ) } { return } else { reject } } - vkoprivica_9683
Nimbostratus
Thank you.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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