Forum Discussion

sandiksk_35282's avatar
sandiksk_35282
Icon for Altostratus rankAltostratus
Mar 29, 2018

irule to allow based on the src IP in the http header

Please let me know if the below http header syntax work.I am trying to allow the traffic looking into the http header for the iv-remote-address

 

when HTTP_REQUEST { Traffic is allowed. Client IP match found in qa if { [class match [[HTTP::header iv-remote-address]] eq "qa" ] }{ pool qa_pool } else { Traffic is dropped. Client IP match not found in QA reject } }

 

1 Reply

  • You should only need single brackets (not double) around HTTP::header iv-remote-address - [HTTP::header iv-remote-address] rather than [[HTTP::header iv-remote-address]]. I'm also assuming you are simply not showing us the code to drop the connection. Other than that, it looks like it should work so long as there is an IP address type datagroup named qa defined on the BIG-IP system.