Forum Discussion
Chris_Howell_11
Nimbostratus
Aug 17, 2006How DO I exclude an IP Address
I looked through the forum and could not find an example that would work for me.
Below is my current rule for redirection:
when HTTP_REQUEST
{
log local0. "Redirection to HTTPS!"
HTTP::redirect "HTTPS://testcase.college.edu/test/"
}
I need to exclude a single IP to continue using port 80. But want to insure all other traffic is redirected to use 443
SO somoehow I want all traffic except for 10.0.0.1 to use https
Thanks,'
Chris
17 Replies
- Colin_Walker_12Historic F5 AccountIf all you're trying to do is check to be sure that the incoming request isn't from 10.0.0.1, you could use something like:
when HTTP_REQUEST { if { not ( [IP::client_addr] eq "10.0.0.1" ) } { log local0. "Redirection to HTTPS!" HTTP::redirect "HTTPS://testcase.college.edu/test/" } }
Colin - Michael_FalkenrHistoric F5 Accountjust a different spin...
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.10.10.128] } {
pool www_f5_com
}
else {
log local0. "Redirection to HTTPS!"
HTTP::redirect "http://www.cnn.com/"
}
} - Chad_Roberts_21
Nimbostratus
One more spin...
I prefer Colin's approach above for a single address exclusion, but if you ever decide to add further addresses, here would be the logic for comparing the address to a group list. Just create a Data Group List of type Address in the iRules section in GTM for this to work. In the example, I have named the group list "address_exceptions".when HTTP_REQUEST { if { not [matchclass [IP::client_addr] equals $::address_exceptions] } { log local0. "Redirection to HTTPS!" HTTP::redirect "HTTPS://testcase.college.edu/test/" } } - Chris_Howell_11
Nimbostratus
THanks you guys are great,
How would I create the Data Group? I think now I need multiple address. My Tandem responds from one of 17 available IPs,
I appreciate the help. I am trying to learn as fast as possible.
Chris - Chris_Howell_11
Nimbostratus
THanks, I am trying this right now.
I apprecaite the help.
CHris - Chris_Howell_11
Nimbostratus
THanks,
After I clicked send, I saw it in the top of your original post, SOrry
Doing it now.
Thanks - JRahm
Admin
The data group list tab under the iRules screen appears to be missing in the GTM gui in 9.2.3.... - JRahm
Admin
I was able to load the class via the CLI in the /config/gtm/wideip.conf file, but I haven't tested anything to make sure it is accessible. - Chad_Roberts_21
Nimbostratus
I'm running BIG-IP 9.2.3 Build 34.3 (one set upgraded from 9.1.something, two sets built from scratch), and it shows up in all of those. Are you running a different build? - JRahm
Admin
A hotfix I applied has altered my version to BIG-IP Version 9.2.3 107.0, which apparently has fixed some things and broken others....
I have seen a stunning amount of bugs and oversights lately....c'mon F5 QC!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
