F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

PG0581's avatar
PG0581
Icon for Cirrus rankCirrus
Jul 21, 2022
Solved

Whitelist certain inbound IPs

Could someone verify if this syntax is correct, please? 

I am looking to only permit certain source IPs contained in the data group "abc_ips" when navigating to a URL and dropping anything else. 

 

 

 

when HTTP_REQUEST {
	if { [class match [IP::client_addr] eq "abc_ips" ] } { 
		return
	} else {
		drop
	}
  }

 

 

 

 

  • Hi PG0581 ,

    Yes, syntax looks good to me. Additionally, you can even add the response page with some message to the unwanted source IP addresses who are trying to access it.  Just a suggetion in case you need it. Thanks!

2 Replies

  • Hi PG0581 ,

    Yes, syntax looks good to me. Additionally, you can even add the response page with some message to the unwanted source IP addresses who are trying to access it.  Just a suggetion in case you need it. Thanks!