Forum Discussion
Le_Phuong_Binh_
Nimbostratus
Aug 16, 2011Please help me to write irule according to ip-address
Thanks for helping.
6 Replies
Sort By
- Michael_Yates
Nimbostratus
Hi Le Phuong Binh, - Le_Phuong_Binh_
Nimbostratus
Hi Michael Yates, - Michael_Yates
Nimbostratus
That is not enough information to assist you with what you are needing. - Colin_Walker_12Historic F5 AccountGenerally speaking, when defining problems that need to be solved, giving as much detailed information as possible helps ensure a speedy response and solution. That is doubly the case with programming and writing code for a deployment that you don't directly control, like many of us do in the forums here all the time.
- Le_Phuong_Binh_
Nimbostratus
Posted By Michael Yates on 08/16/2011 08:10 AM - Michael_Yates
Nimbostratus
Hi Le Phuong Binh,when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/admin" and [IP::addr [IP::client_addr] equals 10.10.10.240/28] } { pool pool.admin.server.set.1 } else { If they are not in the allowed subnet 10.10.10.240/28 redirect them to homepage. You can drop the traffic or whatever else you wish. HTTP::redirect "http://[getfield [HTTP::host] ":" 1]" } if { [IP::addr [IP::client_addr] equals 10.10.10.241/28] } { pool pool.admin.server.set.1 } else { pool pool.admin.server.set.2 } }
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