27-Dec-2016 03:55
Hi, I have below setup Internet user --> Internet Firewall --> F5 --> Backend server (Pool Member)
I have created a virtual server on F5 with IP address 10.10.10.10 which is nattted on internet firewall with 98.98.98.98 IP address. I want this webserver to accept only connections coming for test1.abc.com and test2.abc.com, if test3.abc.com lands on this virtual server then it should be discarded.
27-Dec-2016 04:54
Hi Nuriddin,
You can use irule shown below.
when HTTP_REQUEST {
if {([string tolower [HTTP::host]] equals ";) || ([string tolower [HTTP::host]] equals ";)}{
pool webpool
}
else {
reject
}
}
28-Dec-2016
18:30
- last edited on
03-Jun-2023
23:30
by
JimmyPackets
You can also use the datagroup/class:
when HTTP_REQUEST {
if { not ([class match [HTTP::host] equals ALLOWED_DOMAINS]) } {
reject
}
}
ALLOWED_DOMAINS is a datagroup that contains the list of domains that can be allowed.