This message was deleted.
# citrix-netscaler
s
This message was deleted.
b
Wrote a blog about it last month; look into rewrite policies 🚀 (CLIENT.IP.DST.EQ(VIP-Adres)
m
Which theme are you using? This should work with X1/Green Bubble, if you're using Rfwebui it's different. You can see a version i made on https://gw.netscaler.dk Footer: add rewrite action rw_act_insert_loginfooter insert_before_all "HTTP.RES.BODY(120000).SET_TEXT_MODE(IGNORECASE)" q{"var login_footer=$(\"<div style='text-aligncenter;coloryellow;font-size:15px;'><a href='https://netscaler.dk'>Useless Website</a></div>\").appendTo(logonbox_container);"} -pattern "box_view.prepare_view();" add rewrite policy rw_pol_insert_loginfooter "HTTP.REQ.URL.CONTAINS(\"gateway_login_view.js\")" rw_act_insert_loginfooter Below Login: add rewrite action rw_act_insert_belowloginbtn insert_after_all "HTTP.RES.BODY(120000).SET_TEXT_MODE(IGNORECASE)" q{"var login_belowbtn=$(\"<div><a href='https://netscaler.dk'>Useless Website</a></div>\").appendTo(right_loginbutton);"} -pattern ".appendTo(right_loginbutton);" add rewrite policy rw_pol_insert_belowloginbtn "HTTP.REQ.URL.CONTAINS(\"gateway_login_form_view.js\")" rw_act_insert_belowloginbtn
d
This is what I use for RFWebUI:
add rewrite action rw_act_LoginFooter insert_after_all "HTTP.RES.BODY(120000).SET_TEXT_MODE(IGNORECASE)" q{"(\"<div style='text-aligncenter;color#003c69;font-size:15px;'><br>This system is for use by staff of The XXXXXX Group of Companies "+"and approved contractors and in accordance with the XXXXXX Computer policy</div"} -search "text(\"customAuthBottom\")"
Policy:
add rewrite policy rw_pol_RMS_LoginFooter "HTTP.REQ.URL.CONTAINS(\"/LogonPoint/index.html\") && HTTP.REQ.HOSTNAME.SET_TEXT_MODE(IGNORECASE).EQ(\"auth-rms.xxxxxx.com.au\")" rw_act_LoginFooter
Note this is for a AAA server so is bound globally - and the hostname qualifier in the policy so it only shows for that AAA server and not all of them
PS. Tested on 12.1 and 13, haven't tried on 11.x
b
Have you tried to bound it on the gateway itself?
m
It works bound on the gateway, i just took his config and applied it on my gateway https://gw.netsacler.dk and changed the theme to rfwebui
😀 1
s
Thanks for you help guys. I use a personnalized X1 theme (nothing fancy, just colors and logo). Tried Mads way, I bound it as a response on the gateway, I got hit, but nothing appears on my page.
m
@Steven Lemonier that might be a caching issue, if you're using platinum then flush the cache with flush cache contentgroup loginstaticobjects, else try to unbind the caching policies on the gateway.
I've changed my gateway back to X1 theme and it's showing the footer text now
Action:
add rewrite action rw_act_insert_loginfooter12 insert_after_all "HTTP.RES.BODY(120000).SET_TEXT_MODE(IGNORECASE)" q{"var login_footer=$(\"<div style='text-align:center;color:white;font-weight: bolder;font-size:15px;'>Dear user,<br><br>You are working from home, outside Netscaler Network."+"<br><br> If you are working on a Netscaler laptop, please connect to Netscaler via the VPN client<br><br>You need to write or paste in the name: <http://gslb2.netscaler.dk|gslb2.netscaler.dk> yourself in the VPN field"+"</div>\").appendTo(logonbelt_bottomshadow);"} -pattern ".attr(\'id\',\'logonbelt-bottomshadow\');"
Policy:
add rewrite policy rw_pol_insert_loginfooter_2 "HTTP.REQ.URL.CONTAINS(\"gateway_login_view.js\")" rw_act_insert_loginfooter12
For the one that is shown on my gateway now, the names are fucked up, but i was playing around with something as a customer wanted the text to BLINK... 😄
🤣 2
d
I forgot about the caching - when I was getting first this rewrite working I was rebooting the NetScaler between changes to make sure the caching wasn't interfering.
And yes - same action/policy works for Gateway and AAA with RFWebUI theme 😁 Unlike X1 theme which needs a slightly different policy for AAA than Gateway
s
Alright guys, thank you for your help. Action and Policy from Mads worked as expected once Web Browser cache has been deleted! I don't use Integrated Caching but it helped to think about this! Again, thank you all 🙂
👍 2
b
Glad that you got it working; the ADC is a wonderfull machine but does get you some headache time to time :)