Forum Discussion
Spidey_29396
Nimbostratus
May 20, 2012scan comman line meaning
Hi All,
I'm new with irule. Does any one knows what this line means?
if {[scan [IP::remote_addr] {%*d.%*d.%*d.%d%%%*d} s4] != 1} { reject }
Appreciate much for your answers.
Thank you!
4 Replies
- John_Alam_45640Historic F5 AccountI don't have a ton of experience with the TCL scan command but, here is my 2 cents:
It seems like this command parses the last octet from an IP address. If this command is executed in a client side event, then the remote addr is the client IP address. If it executes in a server side event, then the remote addr is the server IP address.
Either way, the scan command seems to be pulling the last octect and checking if it is a decimal number. that decimal is then put into the variable S4.
There must be more to this though because, what else would the [IP::remote_addr] return besides a series of numbers.
HTH. - hoolio
Cirrostratus
I think the intent of the scan command is to check if the remote IP address has a route domain in the format of 1.1.1.1%1 where each 1 could be any digit(s).
Aaron - Spidey_29396
Nimbostratus
Thanks John and Hoolio! - Spidey_29396
Nimbostratus
Thanks John and Hoolio!
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