Forum Discussion
done_23947
Apr 07, 2011Nimbostratus
restrict 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
- Michael_YatesNimbostratusHi 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_23947NimbostratusThanks much but I think I need something more basic. One Virtual Server and two url's
- Chris_MillerAltostratus
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_23947NimbostratusThat look good. thanks very much.
- done_23947NimbostratusSorry, I'm new to iRule. Getting following error in irule editor.
- hooleylistCirrostratusIt's just missing an r on IP::client_addr.
- done_23947NimbostratusSorry I didn't see that. Will test it this weekend. thanks much.
- Chris_MillerAltostratusHah - maybe we should get a compiler built into posts so I can validate that stuff before clicking submit.
- Michael_YatesNimbostratusSpell 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