Forum Discussion
sandiksk_35282
Mar 06, 2018Altostratus
F5 Whitelisting/ Allowing a specific range of traffic to VS
We have a req to allow only specific subnet range and IPs to access the virtual server it would be great if you help me on this. VS on f5 is configured to listen only on port 443.
- Mar 06, 2018
Create IP type LTM data-group. Define allowed IP/subnet values, and add optional descriptions. You can find data-group creation page at
. Example of an IP type data-group in CLI/TEXT format:Local Traffic - iRules - Data-group List
ltm data-group internal datagroup_allowed_ip { records { 100.20.20.0/32 { } 199.20.20.128/25 { } } type ip }
Create an iRule that checks for matches against entries in datagroup_allowed_ip
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] eq "datagroup_allowed_ip" ] }{ Traffic is allowed. Client IP match found in datagroup_allowed_ip return } else { Traffic is dropped. Client IP match not found in datagroup_allowed_ip drop } }
sandiksk_35282
Mar 06, 2018Altostratus
We have multiple IP in different subnets and I guess it would be better for LTM iRule solution that checks LTM data-group for allowed source IP addresses.
Can you please assist me on the irule.
- Hannes_RappMar 06, 2018Nimbostratus
Refer to new answer below
Rgds
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