Options

Allow a connection based on source IP to a URI

jgreenjgreen Member
How would I allow a connection based on source IP (or serveral source IPs) to an URI? I know in the f5 I can just create data groups and do a class match, but I am not sure how to do it on the a10.

Comments

  • Options
    jgreenjgreen Member
    edited February 2014
    I found it.

    when HTTP_REQUEST

    {if {not [IP::addr [IP::client_addr] equals 192.168.18.0/24] and ([HTTP::uri] starts_with

    “/private”)}

    {HTTP::respond 200 content “

    Transitional//EN”>

    My company

    content=”text/html; charset=iso-8859-1″>

    This web section is accessible only from our corporate offices. “

    }

    }
  • Options
    jgreenjgreen Member
    edited February 2014
    I get this error when I use the format in the example aflex section.
  • Options
    edited February 2014
    It's your double quotes. They are showing up in a strange font when you copy it from the forum. re-type them in notepad, or in the GUI aflex screen.
    when HTTP_REQUEST { if { not[IP::addr [IP::client_addr] equals 192.168.18.0/24] and ([HTTP::uri] starts_with "/private" )} { HTTP::respond 200 content "Transitional//EN> My company content=text/html; charset=iso-8859-1?> This web section is accessible only from our corporate offices." } }
Sign In or Register to comment.