Forum Discussion
Restrict Traffic To VIP By Subnet
- Sep 13, 2019
Just go with a datagroup with Irule method. So that you can add more IP's in the blacklist group on the file. You need not keep editing your irule.
Create a datagroup called blacklist subnet, make sure its type IP.
type: ip
ltm data-group internal blacklist_subnet { records { 20.20.20.0/32 { } 30.30.30.30/25 { } } type ip }Then create your irule like below,
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] eq blacklist_subnet] } { log local0. "Client IP - [IP::client_addr] is blacklisted. Dropped traffic" drop } }
Just go with a datagroup with Irule method. So that you can add more IP's in the blacklist group on the file. You need not keep editing your irule.
Create a datagroup called blacklist subnet, make sure its type IP.
type: ip
ltm data-group internal blacklist_subnet {
records {
20.20.20.0/32 { }
30.30.30.30/25 { }
}
type ip
}Then create your irule like below,
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] eq blacklist_subnet] } {
log local0. "Client IP - [IP::client_addr] is blacklisted. Dropped traffic"
drop
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
