Forum Discussion
done_23947
Nimbostratus
Apr 07, 2011restrict public access
I need help w/ a iRule.
I have two URL's, https://ssb.xx/ODSP/twbkwbis.P_ValLogin and https://ssb.xx/PROD/twbkwbis.P_WWWLogin.
Both use same public IP address VIP.
I would like to allow public Internet access to one but not the other. And allow only private addresses (internal users) 10.233.x.x to the non public URL. Thanks
10 Replies
Sort By
- Michael_Yates
Nimbostratus
Hi Done,when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/prod" } { if { ![class match [IP::client_addr] equals InternalNetworkList ] } { Take Action Here. HTTP::redirect " https://ssb.xx/ODSP/twbkwbis.P_ValLogin" } } }
- done_23947
Nimbostratus
Thanks much but I think I need something more basic. One Virtual Server and two url's - Chris_Miller
Altostratus
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/prod" and ![IP::addr [IP::client_add] equals 10.233.0.0/16] } { discard } }
- done_23947
Nimbostratus
That look good. thanks very much. - done_23947
Nimbostratus
Sorry, I'm new to iRule. Getting following error in irule editor. - hoolio
Cirrostratus
It's just missing an r on IP::client_addr. - done_23947
Nimbostratus
Sorry I didn't see that. Will test it this weekend. thanks much. - Chris_Miller
Altostratus
Hah - maybe we should get a compiler built into posts so I can validate that stuff before clicking submit. - Michael_Yates
Nimbostratus
Spell Check! Spell Check! (with custom library for TCL Commands and iRule Lingo). - Spell check would be great..
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