Forum Discussion
uisomdc_95191
Nimbostratus
Sep 04, 2008adding strings to data group
so we had a whole bunch of stuff to add to a string data group, but didn't feel safe giving operators privs to do this manually. in comes pycontrol and the class wsdl. This will iterate over inputfil...
ReynaldoQ_14206
Nimbostratus
Jan 19, 2018I finally figured it out. They did not add the SSH Key in the F5. Thanks all.
- Nov 17, 2021
Hi TJ01,
You can use [HTTP::header host] or [HTTP::host]
when HTTP_REQUEST { if { [HTTP::host] equals "10.11.12.13" } { log local0. "request dropped - Host: [HTTP::host] ClientIP: [IP::client_addr]" drop } }
For access only with host "abc.example.com"
when HTTP_REQUEST { if { [HTTP::host] ne "abc.example.com" } { log local0. "request dropped - Host: [HTTP::host] ClientIP: [IP::client_addr]" drop } }
Thanks Enes -- Appreciate your help on this ...
if we choose to use code to allow the host with "abc.example.com" only .. will that include the header of "www. abc.example.com" or need to explicitly add it what that "and" statement would be ?
- Nov 24, 2021
Hi TJ01,
It will not contain "www.abc.example.com". If want to match with www:
when HTTP_REQUEST { if { [HTTP::host] ne "abc.example.com" && [HTTP::host] ne "www.abc.example.com" } { log local0. "request dropped - Host: [HTTP::host] ClientIP: [IP::client_addr]" drop return } }