Forum Discussion
iRule to Allow Access from a set of IPs to a L4 Virtual Server
Hi,
Virtual Server is listening for TCP or UDP requests on Port 0 and its not a standard L7 Virtual Server.
It's just a pass-through VS which just forwards the requests received as it is to the pool members.
Can we use the below iRule to restrict the access to this Virtual Server from a set of specific IPs and will this iRule work if the VS is configured for UDP on port 0 ?.
======================
when CLIENT_ACCEPTED {
if { not ([class match [IP::client_addr] equals pvt_ips]) } {
reject
}
}
======================
Thanks,
Yugandhar.
- Kevin_Stewart
Employee
Technically yes this should work. TCP and UDP share this event.
Ref: https://devcentral.f5.com/wiki/iRules.EventsForUDPVirtualServers.ashx
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com