I’m definitely new to irules and codes so bare with me. I’m trying to come up with an irule in the LTM that will allow me to have internal clients to a webpage clear text(http), while redircting external clients to https. Here’s the irule I having problems with. I keep getting an error with the “ne” when reffering to my data group list for the inside rfc1918. Any help would be appreciated!
when HTTP_REQUEST { log local0. “X-Forwarded-For: [HTTP::header “X-Forwarded-For”]”
foreach xff [split [string map [list " " ""] [HTTP::header "X-Forwarded-For"]] ","] {
log local0. "Current XFF element: $xff"
if {[class match $xff ne private_net]}{
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
}