Forum Discussion
craig_m_254946
Nimbostratus
Mar 17, 2016iRule to restrict TCP and UDP to the same range of ports.
Like the title says, I'm trying to make an iRule to restrict ports to a VS.
I was trying to use the following, but getting an error.
when CLIENT_ACCEPTED {
if {([TCP::local_port] >= 10514 ) ...
Mar 17, 2016
You're missing some curly brackets. Try this:
when CLIENT_ACCEPTED {
if {([TCP::local_port] >= 10514 ) && ([TCP::local_port] <= 10526) || ([TCP::local_port] >= 514 ) && ([TCP::local_port] <= 515) } {
pool Pool_Name
} elseif {([UDP::local_port] >= 10514 ) && ([UDP::local_port] <= 10526) || ([UDP::local_port] >= 514 ) && ([UDP::local_port] <= 515) } {
pool Pool_Name
} else {
reject
}
}
/Patrik
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