HOWTO: Configure Citrix Netscaler to Perform Website Aware Load Balancing

This HOWTO describes the process of configuring a Citrix Netscaler to monitor for a keyword on a load balanced website and if that key word is not found (ie the node has failed), remove it.  Once removed, continue scanning and once the node is back up, read it.

  • The foundational technology we use here is called a “Monitor” which in Citrix parlance is a entity that can be used to repeatedly check some condition against some service
  • While you can configure monitors from the GUI, it turns out the GUI adds some random carriage returns that breaks the entire process so you have to do it from the CLI
  • So first you want to putty into the Netscaler.  Once logged in, you can type “shell” to access the full linux command line.  In our case, we don’t want to do that as we are running Netscaler specific commands
  • Create a new monitor using the command:

 

add lb monitor [monitorname] TCP-ECV -send “GET / HTTP/1.1\r\nHost:[hostheadername]\r\nConnection:Close\r\n\r\n” -recv [Keywordtosearchfor] -LRTM ENABLED

  • What this command does is:
    • creates a monitor called monitorname and makes it based on the built in template “TCP-ECV”.  The arguments provided to the –send parameter tell it what to send to the IP address you’ll configure later.  (You can probably configure it on the same line but I don’t know how to do that yet).
    • The GET / says get the root page.  So in this case, hostheadername doesn’t have an index.html or anything on the end so we can simply request the root page.
    • Because we are using host headers, we have to provide the host we are looking to connect to.  (This was the hardest part to figure out).  You’ll note the line remarks for \r and \n.  Those are critical as they must follow the HTTP standard.
    • The “connection close” close the connection after you obtained the information you needed so you don’t leave it hanging open.
    • Keywordtosearchfor is the string we’re looking for in the results to determine if the page is serving the content you expect or not.
    • The LRTM stands for “Least Response Time using Monitoring”.  I don’t know what it does but it seems like I need it.

    Read more

HOWTO: Figure out whose is using space in the Recycle Bin Folder

I was troubleshooting a low disk space alarm on a server.  After running TreeSizeFree, I discovered that the bulk of the space was in use in the Recycling bin which is stored in a hidden directory called #:\RECYCLER (I say # because on exists on each drive present in the machine).

 


 

You’ll note however that windows doesn’t store the username that deleted the files but rather the SID of the user.  Now one could argue that if it’s in the recycle bin already then that’s tantamount to bringing your garbage to the curb and thus can be removed at any time.  With that said, I still like to confirm the data first with the user if possible, mostly so I can explain the importance of either using “shift-delete” to permanently delete data or by regularly emptying the recycle bin.  An ounce of prevention and all that.

 

At any rate, I now have the requirement of understanding just who S-1-5-21-77810565-118882789-1848903544-39792 actually is.

 

It turns out you can run a vbs script to tell you that.  (Source code below)

 

When you double click on from explorer, you’ll be given a Windows message box.  Copy and paste the SID here and press OK:

 

Read more

Automated Macrium Reflect Backups to ISCSI Storage

This HOWTO will allow you to accomplish the following tasks using Macrium Reflect:

– Detect if a external NAS device is powered on and if not, power it on for the duration of the backup and power it down again
– Wait for the web management interface of the NAS device to come online before starting the backup
– Use Powershell to connect to the ISCSI target by verifying several characteristics of the NAS and assign it to a known drive letter
– Start a Reflect Backup and write to this data store

Click below read more link to check out the full source code!

Read more

HOWTO: Install a Slackware Linux BIND DNS Server From Scratch

This HOWTO describes how to set up a Slackware Linux based BIND9 virtual DNS server.  The background on why this HOWTO came to be is that I recently received a renewal notice for my domain vanlab.net.  I haven’t used this domain for anything in nearly a year.  Not wanting to pay for DNS hosting or use someone else’s DNS servers, the domain has as a result sat idle.

It occurred to me last night though hat anything this domain would ever be used for would run off my laptop.  Since I’m the only one that would ever use it, it would be fine if it only was available when I was studying.  Therefore I decided that it would be feasible to host my own "part time" DNS server.

I opted not to use any flavor of Windows for three reasons:   First, I wanted as small a footprint as possible as this is a VM that will be running on my laptop all the time.  Second, Windows officially requires a license. (In my mind, this is a "production" implementation so I wanted to find something legal). Third, I’ve always wanted to see if I could make a useful Linux server and I finally came up with a use case.

What follows is how I’ve managed to successfully get my laptop to run a virtual machine that can resolve external DNS queries for vanlab.net.

Software

  • We will be using SMS or Superb Mini Server (http://sms.it-ccs.com) as our Linux distribution of choice.  After much trial and error with multiple distros, I found this one the best as it includes a tool called Webmin that provides a graphical web based interface for configuring BIND
  • (There is a wiki page for configuring this server at http://sms.it-ccs.com/wiki/)
  • Download the SMS64.Live.CD-2.0.5.iso file.  Note: We are downloading the live CD and will install to the HD rather than the full installation despite the recommendation by the distro.  I tried to install the full version but couldn’t get it to boot.  It also includes almost 3GB of packages, almost none of which I needed for this project anyway

Domain Configuration

  • My domain is registered with dyndns.org.  I first needed to configure the name servers for the domain.  I logged into the management interface at https://account.dyn.org
    and went to / My Zones Domains / Domain Registration / Edit Name Servers
  • I added two entries (as a minimum of two are required) for ns1.vanlab.net and ns2.vanlab.net.  I then created two glue records by the same name and pointed both of those IPs at my Shaw public IP of 175.0.103.66.  (An IP that hasn’t changed in 2 years so it’s nearly public anyway)

Read more