Forum Discussion
Chenco_322726
Jun 13, 2017Nimbostratus
restrict website to only specific ip addresses on same VS
Hello Friends ,
I have many domains on the same VS .
and i am trying to restrict the access to to only specific ip addresses
the problem is i found some irules on google but the problem is that i ha...
- Jun 13, 2017
You could create a data group with the allowed ip addresses, and then reference them in an iRule, that only matches if the host header is :
when HTTP_REQUEST { if { [HTTP::host] equals "www.example.com" } { Require client ip address to be present in datagroup (dg_example.com) for allowed source ip's if { ! [class match [IP::client_addr] eq dg_example.com] } { drop return } } }
Morten_Marstran
Jun 13, 2017Nimbostratus
You could create a data group with the allowed ip addresses, and then reference them in an iRule, that only matches if the host header is :
when HTTP_REQUEST {
if { [HTTP::host] equals "www.example.com" } {
Require client ip address to be present in datagroup (dg_example.com) for allowed source ip's
if { ! [class match [IP::client_addr] eq dg_example.com] } {
drop
return
}
}
}
- Ed_SummersJun 13, 2017Nimbostratus
Looks like you beat me to it. And I refreshed the page prior to posting to make sure I didn't come out a fool! ;)
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