I’m hoping someone can give me a hand with this. I literally copy and pasted this into a new aFlex script, and I get “System has encountered some problem. Please try again later!” when I click Create. I’m on a TH3030S running 4.0.1-SP9 build 31 if that helps.
Hi Genard, this was attempted using the GUI. I started by trying to block ecs, ews, and autodiscover to external IPs using the guidance here, under the “Security” section.
None of the examples worked, and they all returned that message. I found the shorter link and that one failed also as mentioned above. I though it may be an issue with the parser, so I tried one that was already in our A10, a simple HTTP-to-HTTPS redirect, and that one took. Not sure why these are failing.
So I found the problem. The "(quotes) on the /ecp wherever you copied and pasted the aFleX translate to a different character. I suggest that you retyping the "(open quote/close quote) characters for the script to work. Tested it and it works.
when HTTP\_REQUEST \{
if \{ [HTTP::uri] starts\_with “/ecp” \} \{
That did the trick Genard, thank you for finding that. I was able to get the blocking working, and a visual confirmation with a HTTP::redirect. Thanks again for your help.
when HTTP\_REQUEST \{
set URI [HTTP::uri]
if \{ not [IP::addr [IP::client\_addr] equals 192.168.1.0/24] and ($URI starts\_with "/ecp")\} \{