Forum Discussion
sysadmin_2015_2
Nimbostratus
Sep 22, 2015iRule - Whitelisting/Blocking IP Addresses
Hello,
We use a third party for our CDN and web security. I would like to write an iRule where we whitelist only their IP ranges and block all other traffic. Can someone please assist me in wr...
arpydays
Nimbostratus
Sep 22, 2015If you know their IP ranges then a simple irule/datagroup would do it. This rule will drop any connections from clients not in the 'allowed-nets' datagroup,
cheers
when CLIENT_ACCEPTED {
if { not ([class match [IP::client_addr] equals allowed-nets]) } {
log local0. "[IP::client_addr] is not permitted to site xxxx"
drop
}
}
ltm data-group internal allowed-netss {
records {
192.168.20.0/24 {
data "NetYYYY"
}
}
type ip
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects