Imperva Cyber Community

 View Only
  • 1.  Whitelist for specific url and ip

    Posted 07-20-2023 05:20


    I want to limit some page(url) could only access with specific ip.

    ex:, could only access by

    How should I setting on cloud waf to meet my needs?


    ZhiXiang Zhang
    Fairline Technology Co., Ltd

  • 2.  RE: Whitelist for specific url and ip

    Posted 07-20-2023 10:11

    Hi ZhiXiang, 

    This can be accomplished with an IncapRule. (Security Rule)

    Within the UI for the onboarded domain, expand Security in the left hand nav and click Rules.

    At the top right, click the blue Add Rule button.

    Select URL from the first drop down box.

    The second filter will determine how to match the URL. If you want a strict match choose "==". This would match strictly /topic.

    Alternatively, you could choose "Starts with". This would match /topic/path1, /topic/path2, etc. 

    In the Value field, enter /topic

    Click the blue +Add button

    The editor window should be as displayed below.

    Now we need to apply the IP restriction.

    From the first drop menu, select Client IP

    For the second drop down box, select != (this means, "does not equal")

    In the Value box, enter the IP,

    Click the blue +Add button.

    The editor box should now appear as below:

    This logic states that if the URL is /topic and the Client IP is not, the execute the action.

    The next step is to define the action.

    From the Action menu, select Security and then Block Request.

    Give the rule a name within the Rule Name box and click Save.

    The rule should look like the following when you are done.

    Jaired Anderson

  • 3.  RE: Whitelist for specific url and ip

    Posted 01-27-2024 00:43

    Hi Jaired,

    What is the equivalent for this on on-prem configuration settings? 

    I understand that I need to create a policy for that specific URL and match only specific address. 

    eg: already present.

    What i need to allow is* which can only be accessed via ip, prefixes.

    Appreciate your feedback.




  • 4.  RE: Whitelist for specific url and ip

    Posted 01-29-2024 10:46

    Hello Angfe,

    This would be accomplished via a "Web Application Custom" policy under Main > Policies > Security.

    Click the green + to add a new policy.

    believe the logic I have in the screenshot is accurate for your desired outcome, but please test in a test environment to confirm it works as expected.

    A few things to note:

    • A URL Prefix should match /xyz345/*
    • Source IPs could also be maintained via a Global Object list. Main > Setup > Global Objects > Lookup Data (Scope Selection)

    Jaired Anderson