Forum Discussion

bcao_215270's avatar
bcao_215270
Icon for Nimbostratus rankNimbostratus
Aug 07, 2018

APM IP subnet expression failing to match

Trying to match client ip to IP subnets but can't seem to get the syntax right. I've tried the following expressions below, and a few others, but I keep getting a syntax error. Any help would be appreciated. Thanks.

 

expr { [IP::addr [mcget {session.user.clientip}] equals "10.10.10.0/24 or 172.16.0.0/27"] }

 

expr { [IP::addr [mcget {session.user.clientip}] equals "10.10.10.0/24"] or [IP::addr [mcget {session.user.clientip}] equals "172.16.0.0/27"] }

 

1 Reply

  • In APM, you can create the expression from simple tab... the result expression is

    expr { [IP::addr [mcget {session.user.clientip}] equals "10.0.0.0/8"] || [IP::addr [mcget {session.user.clientip}] equals "172.16.0.0/27"] }