Customize Citrix Netscaler 11.1

Customize Citrix Netscaler 11.1

Don’t waste an entire week trying to customize NS 11.1. Trust me, that’s how long it took me sifting the internet for different ways to do this only to run into snag after snag. I want to save you some brain cells. Please, read on…

Tools you’ll need

Set your theme

For this example, I am using X1 as my template to start out with. Login to the Netscaler GUI to accomplish this(Netscaler Gateway -> Portal Themes).

File Locations

During my quest to customize NS 11, I found it hard to find the files that I needed to be concerned about for code manipulation. To make it easier for everyone, make note of these key files and locations:

  • /var/netscaler/logon/themes/*theme name here*/css/custom.css
  • /var/netscaler/logon/themes/*theme name here*/footer.html (you will create)
  • /netscaler/ns_gui/vpn/js/gateway_login_view.js
  • /nsconfig/rc.netscaler (you will create if doesn’t exist)

Contents of custom.css

 Contents of gateway_login_view.js lines 33-46

 var logoimage = logonbox_logoarea.append($("
").attr('id','logonbox-logoimage')); // Add in a Footer DIV if the footer.html file can be found var footerfile = new XMLHttpRequest();'GET', "../logon/themes/Default/footer.html", false); footerfile.send(); while (footerfile.readyState !=4) {sleep(10);}; var logonbox_footer = ""; if (footerfile.status == 200) { logonbox_footer = "" }; authentication.append(logonbelt_topshadow,logonbox_container,logonbelt_bottomshadow); logonbox_container.append(logonbox_innerbox); //logonbox_innerbox.append(logonbox_logoarea,logonbox_logonform); logonbox_innerbox.append(logonbox_logoarea,logonbox_logonform,logonbox_footer); // Modified line adding in the extra DIV

Contents of rc.netscaler

cp /var/netscaler/gui/vpn/js/gateway_login_view.js /netscaler/ns_gui/vpn/js/ gateway_login_view.js

Set background image

Nothing special here, just select the image you want from the Netscaler GUI.

What’s rc.netscaler do?

The reason for rc.netscaler is so that all of our hard work isn’t lost when the Netscaler is power cycled. Please do NOT forget this step.

You’re all done! There is no need to try adding a EULA and modifying it, setting up response policies, etc., etc. Big thanks to the guys over at: for their tutorial. Before landing on their site, I was about to call it quits.