Setup NetScaler as ADFS Proxy

Most home labs and small businesses normally only have 1 public IP address and since a lot of services run on port 443 it becomes difficult to open these to the internet. That’s the case for me, and last week I spent WAY to much time trying to get NetScaler ADFS Proxy running behind a Content Switch.

I’ve been working a while on an article called Getting Started with Office 365, but before I can release that to the public I need to resolve my main problem, getting NetScaler ADFS Proxy up and running on the same IP address as my Unified Gateway.

Setup Netscaler as ADFS Proxy 01

Needless to say, after pointing my public IP address to my NetScaler Content Switch, ADFS went down and my business email became unavailable (luckily it worked from iOS devices).

There’s hardly any info online and most are related to ADFS 2.0. Without this blog post I would never been able to figure this out. But there was a problem, the NetScaler monitor in that post didn’t work for me.

85% of my NetScaler Load Balancer Config time is customizing monitors
Dave Brett – CUGC Netscaler SIG Leader

So let me show you how I managed to configure NetScaler as ADFS Proxy without AAA. Let’s get started.

NetScaler ADFS Proxy – Prerequisite

First off make a backup/snapshot your of NetScaler VM and download a copy of /flash/nsconfig/ns.conf.

Make sure to enable the Rewrite Feature.

Netscaler ADFS Proxy 06

NetScaler ADFS Proxy – Configuration

Replace the config below with the following:

  • 192.168.1.170 with IP or FQDN of your internal ADFS Server
  • UG with the name of your content switch
  • HOSTNAME with the hostname of your ADFS certificate
  • Wildcard-External with the name of your wildcard certificate

Connect to your NetScaler through Putty and paste the following commands:

I could provide 50 screen shots on the above config, but there’s so many things that could go wrong that I ONLY recommend going the command route.

As with every blog posts and videos inside my xenapptraining.com course, they’re all tested various times!

After you’ve added all the commands head into Traffic Management – Load Balancing and check that the vip_adfs_https vServer is in Up State.

Netscaler ADFS Proxy 08

Finally check externally or locally by modifying your local hosts file (IP ADR of your Content Switch).

Open a browser to http://microsoftonline.com

Netscaler ADFS Proxy 02

After entering your email address the page should successfully redirect you to your internal ADFS authentication page.

Netscaler ADFS Proxy 04

Read the post Customize Your Internal Web Resources to customize the sign in page.

If everything works okay, head over to Putty again and save your config.

You might get problems however, depeding on SNI and your certificate. This can easily be resolved by running the following two commands on all of your ADFS Server(s).

Netscaler ADFS Proxy 10

If you use Powershell you need appid='{APPLICATIONID}’ while with Command Prompt it’s just appid={APPLICATIONID}.

You’ll probably see a lot of Warnings on your ADFS Server(s). This is related to NetScaler checking the XML file (Monitor), so no worries.

Netscaler ADFS Proxy 09

According to the twitter storm I hope many find this blog post helpful. One less server and OS license in the DMZ.

Archives
Don`t copy text!