Logos_Sydney
Nov 19, 2020Nimbostratus
IP Restrictions on Certain Sites With a shared Virtual Server
Hi guys,
we have couple of websites that are sharing a same F5 virtual server.
e.g.
111.abc.com
222.abc.com
333.abc.com
In the meantime, I’d like to create an iRule for restricting access to 111.abc.com & 222.abc.com with a list of IP subnets only.
In other words, I don’t want to setup any IP restriction on 333.abc.com.
Please review my iRule below and advise accordingly.
Many thanks in advance.
when HTTP_REQUEST {
if { not [class match [HTTP::uri] starts_with URL_List] }
return
}
}
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals Allowed_IP_List] and [class match [HTTP::uri] starts_with URL_List]
return
} else {
drop
}
}