Forum Discussion
youssef1
Dec 10, 2018Cumulonimbus
Hi,
you can test this irule:
when CLIENT_ACCEPTED {
log local0. "Accepted--start iRule"
if {([TCP::client_port] <= 1000 && [TCP::client_port] >= 65000) && ([TCP::local_port] == 443) } {
do nothing
} else {
log local0. "[IP::client_addr] rejected on TCP [TCP::client_port]"
reject
}
}
For info:
[TCP::client_port]
is your source/local port in your context (clientside)
[TCP::local_port]
is your destination port in your context (clientside)
This article can help you:
https://devcentral.f5.com/Wiki/iRules.TCP__local_port.ashx
regards