Forum Discussion
prevent users to access URL using IP
Hi Experts, how do I prevent users to access the URL using IP? If uses access using IP, would like to drop those connections.
Thanks
- Dario_Garrido
Noctilucent
Try this ->
when HTTP_REQUEST { if { [HTTP::host] matches_regex "\d+\.\d+\.\d+\.\d+" } { drop } }
KR,
Dario.
- Cody_Green
Employee
An easy way would be to leverage the black list feature in AFM (which is including in Better and Best licensing bundles). If you don't have AFM then you can leverage an iRule that looks for IPs inside a data group. You could base the code off this example but instead of setting reqBlock to 1 just reset the connection right then - no need for the ASM_REQUEST_DONE event.
You could also use a traffic policy in LTM to only allow traffic if the host header has the correct name.
Cheers,
Kees
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