Tuesday, 31 March 2009

Backing up your Microsoft DHCP server

Note: this applies to Windows 2003, I haven't tested it on Windows 2008 yet.

Rather than use multiple DHCP servers in case of failure, I prefer to take regular backups of the DHCP scope. This can then be restored to an alternate DHCP server in case of a failure of the primary one. I have the alternate one fully configured but with the DHCP service stopped, so it is just a case of starting it up and restoring your latest backup to it when required.

To back up your DHCP server, get a command line and enter the following command:
netsh dhcp server export dhcpbackup.bak all
The above command will backup all the scopes on your DHCP server to a file called dhcpbackup.bak. I enter this into a batch file and run it as a scheduled task so I always have an up to date copy. In the event of needing to switch to my backup DHCP server, I just need to start the DHCP service and run the opposite command:
netsh dhcp server import dhcpbackup.bak all

Friday, 20 March 2009

Minimum disk space required for MailMarshal to send mail

It turns out that MailMarshal has a minimum amount of disk space required (512MB) that it needs to be able to process mail. If there is not enough disk space then errors will be noticed in the receiver log files, similar to the following:
3320 00:01:26.510 Diskspace: free=0x00000000208cb000, limits=(0x0000000020000000, 0x0000000040000000), avail=1% on (D:\Program Files\Marshal\MailMarshal\Quarantine)
3320 00:01:26.510 Diskspace: free=0x00000000208cb000, limits=(0x0000000020000000, 0x0000000040000000), avail=1% on (D:\Program Files\Marshal\MailMarshal\Logging)
3320 00:01:26.510 Diskspace: free=0x00000000208cb000, limits=(0x0000000020000000, 0x0000000040000000), avail=1% on (D:\Program Files\Marshal\MailMarshal\Queues\Incoming)
3320 00:01:26.510 Low disk space left, sleeping for 29s. Found 520.79 MB free on D:\Program Files\Marshal\MailMarshal\Queues\Incoming. Minimum required: 512.00 MB. Minimum preferred: 1.00 GB.
Adding more disk will resolve the issue — another reason to be Virtual!

Wednesday, 18 March 2009

Virtualising SQL Server

My colleague Rob found a document on Microsoft's website which discusses the issues around running SQL Server in a virtual environment. Basically the conclusion is 'go for it' unless you are running very heavily used databases which could cause performance issues.

You can get the document at http://download.microsoft.com/download/a/c/d/acd8e043-d69b-4f09-bc9e-4168b65aaa71/SQLVirtualization.doc

Installing Sophos Anti-Virus on Windows 2008

When installing Sophos remotely on a Windows 2008 server with the firewall enabled there may be a problem if the firewall isn't correctly configured to allow remote installations. See the Sophos article here for instructions on how to configure it.

Tuesday, 17 March 2009

"All Users" folder has moved in Windows 2008

In their infinite wisdom Microsoft have done their usual trick of moving things around in their new OS - just to confuse everybody. In my line of work I often have to make an application run on logging into Windows and to do that you used to put a shortcut to it in "C:\Documents and Settings\All Users\Start Menu\Startup". But for some reason MS have moved the folder, it now is at "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"!

What the hell the ProgramData is for I haven't yet worked out. It's hidden, by the way, so you either need to enable viewing hidden files and folders* or you can type the path in the address bar.

*Which I don't like to do as some files and folders are hidden for a reason. I can't think why the "All Users" folder is hidden...

Thursday, 5 March 2009

IP address change requires CSG reconfigure

If you change the IP address of the Citrix Secure Gateway, you need to make sure that you re-run the configuration tool. Otherwise the service will not start - it will complain with an error in the event log saying:
No listening sockets available, shutting down. (Hint: Port might be in use by another process)

Odd firewall problem with Citrix Secure Gateway on Windows 2008

This problem kept me stumped for the best part of a day but I got there in the end.

I have installed Citrix Secure Gateway (CSG) in order to provide secure access to our Citrix XenApp farm. I am using Windows 2008 (which is a fantastic OS, I am enjoying using it more and more). Windows 2008 comes complete with extensive firewall capabilities to help keep it secure. On Windows 2003 I didn't really bother with these but I have resolved to make use of them from now on, especially as they have been improved so much in the new OS. Anyway, on to the problem.

CSG uses SSL which of course runs over TCP port 443. The default Windows firewall rule, which I believe is activated when you install IIS, allows connections into 443, from any external address to any internal address on the server. However, it only allows connections into the 'System' program -- I take that to mean actual Windows system services, in this case presumably the World Wide Web Publishing Service. To enable access to CSG I created a new rule which allowed connections to 'D:\Program Files\Citrix\Secure Gateway\bin\CtxSGSvc.exe'.

Obvious really!

Monday, 2 March 2009

Simpsons avatar

If you're interested in how I got my Simpsons-style avatar, you can create it at http://www.simpsonsmovie.com/

I look a bit like Homer's half-brother which is pretty scary....