Layer7 API Management

  • 1.  Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 26, 2018 11:58 AM
      |   view attached

    we added XFF variable we are getting an error.. how to perform this ipwhitelisting using IP address Range property assertion



  • 2.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 26, 2018 12:05 PM

    Hi Prem, 

     

    Make sure to use the context variable "${request.http.header.x-forwarded-for}" in the "Restrict Access to IP Address Range" Assertion. 

     

    Thanks,



  • 3.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 27, 2018 01:44 PM

    I used that CV in our policy. But I'm seeing some error in that part



  • 4.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 27, 2018 01:48 PM

    Hi Prem,

     

    Can you please provide details of the error ?

     

    Thanks,



  • 5.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 27, 2018 03:01 PM

    Error:

     

    com.l7tech.server.MessageProcessor: 3017: Policy evaluation for servic e spaceissue [2c993be8fd2512b6191d0c975f50aeb9] resulted in status 500 (Internal Server Error)
    2018-02-27T13:56:37.269-0600 WARNING 656 com.l7tech.server.policy.assertion.ServerRemoteIpRange: 4504: Could no t resolve a remote IP address from the context variable "${request.http.header.x-forwarded-for}".
    2018-02-27T13:56:37.270-0600 WARNING 656 com.l7tech.server.message: Message was not processed: Internal Server Error (500)

     

    I configured IP restrict assertion as below



  • 6.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 27, 2018 05:09 PM
      |   view attached

    Do no put double quotes and ${} in the context variable field. Just the name of the context variable.



  • 7.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Feb 27, 2018 08:40 PM

    Hi AtulRaut,

     

    I tried both ways, Just for testing I used ${}. I tried to capture All header values in that part too I'm not seeing XFF filed value.

    If I try to capture IP in audit logs I'm only seeing IP of the load balance

    Could you help me how to capture the client IP instead of LB IP. I used audit log like  

     

    Is there any other audit logs can I use to capture client IP  details.

     

    Thanks.



  • 8.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5
    Best Answer

    Posted Mar 01, 2018 02:55 AM

    Hi Prem,

    right click on your policy and start the "Service Debugger". Then initiate a request and verify the headers of the request.

    Either the header is spelled differently or it is not available at all. For the latter case you need to verify the configuration of your F5-LB, why the header will not correctly inserted.

     

    Ciao Stefan



  • 9.  Re: Is there a way to findout clientip using any inbuilt variable.. we are having F5

    Posted Mar 01, 2018 10:04 AM

    Hi Stefan,

     

    Thanks for your help, I'll check with our F5-LB team. 

     

    Regards,

    Prem.