Is it possible to find current connection to the WAF (Application Gateway) with client IP?

Mohsen Akhavan 831 Reputation points
2023-09-03T08:36:11.2733333+00:00

In my scenario, I have an Application Gateway (WAF) that receives all requesters and sends them to web apps.

I want to know, is there any way to find the current connection with the client IP that they are connected to web apps?

If yes, how can I disconnect access for a specific IP?

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,217 questions
Azure Web Application Firewall
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 49,611 Reputation points Microsoft Employee Moderator
    2023-09-04T10:32:04.28+00:00

    @Mohsen Akhavan

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to monitor the current connections and filter using Client IP.

    Currently, I am afraid this will not be possible.

    You must define a rule to block the client IP before hand.

    However, you can check the logs and filter for the client IP.

    AzureDiagnostics | where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess"
    

    Now, to block a certain client IP,

    For Live monitoring, you can use the below metrics,

    P.S :

    • The WebApp will not see the client IP at all as the source IP
      • It will be present in the X-Forwarder-For Header
    • It will only see the AppGw's IP as AppGW acts as a reverse proxy to your App Service.

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.