Forum Discussion
Lisa_Boyd_53788
Nimbostratus
Dec 07, 2005New to matchclass+IP::remote_addr & Data Group List
Goal: To restrict access to webservers via ip address
Three Data Groups were created: My-Nets, Cus-Health & Thomson-ExternalNets. If remote ip addresses are in Data Group List My-Nets or Cus-Health they are directed to the correct pool of webservers, otherwise if the remote ip addresses belong to the Thomson-ExternalNets group they are re-directed to MSN's or CNN's website.
Problem:
My ip address is part of the Thomson-ExternalNets Data Group, yet when I enter in/login with CustomerX creditenials, I am not re-directed to MSN's or CNN's website.
Current iRule in place:
elseif {[HTTP::uri] starts_with "/CustomerX/"} {
if { [matchclass [IP::remote_addr] equals $::My-Nets] } {
pool Test-Cus-Bambi
}
elseif { [matchclass [IP::remote_addr] equals $::Cus-Health] } {
pool Test-Cus-Bambi
}
elseif { [matchclass [IP::remote_addr] equals $::Thomson-ExternalNets] } {
HTTP::redirect "http://www.msn.com/"
}
else {
HTTP::redirect "http://www.cnn.com/"
}
}
Can someone offer some suggestions on what the issue maybe?
-Lisa
- What you are looking at doing should be possible. Since you haven't posted a complete iRule, we can't tell if there is a problem elsewhere in the code. I would recommend you add logging statements at each path in your code so that you can diagnose for yourself where the control flow is failing you.
if { [matchclass [IP::remote_addr] equals $::My-Nets] } { log local0. "address [IP::remote_addr] found in class My-Nets" pool Test-Cus-Bambi } elseif { [matchclass [IP::remote_addr] equals $::Cus-Health] } { log local0. "address [IP::remote_addr] found in class Cus-Health" pool Test-Cus-Bambi }...
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