iRule to isolate node
I need help with an iRule. I have BigIP LTM v11.6 HF4
We have a webfarm configuration that runs a primary server node and several secondaries. What I want to accomplish, is to ensure that when somebody connects from our corporate office, they connect to the primary node's website (so files and data can be updated and such). However, I don't want anybody from the outside world (non corp) to be able to hit the primary server's page. Currently, I have an iRule that forces people from my corp office (38.1.0.1 in this example) and locks them into the primary node (192.168.1.100) on port 80 so website content can be updated. See below:
when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr] equals 38.1.0.1] } { node 192.168.1.100 80 } }
I think that I should use some kind of "else CLIENT_REJECT" statement, or "else redirect". This way, I can protect access to my primary server, but still allow visitors to the page (via one of the secondary servers). Can this be done?
Hope this makes sense,
Thanks!
JD