FreeNAS 11.3 – Setting Up OpenVPN Server In A Jail

This article documents how to setup an OpenVPN server on a FreeNAS Jail, allowing user(s) to be able to access the Freenas UI via the VPN but also other areas of the network where the Freenas server resides.   The user will need to specify a username, password to be able to login.  The password can be set by the user, however they will also need Google Authenticator to provide a  6 digit code.

Continue reading

Generating RSA Public Modulus, Public Exponent & Private Exponent As HexDecimals

I was messing around the other day with RSA encryption and came across the site It demonstrates how to use RSA encryption to encrypt/decrypt a text string. I was interested in the key generation for this, this page just has a generate button however, I wanted to understand how I could generate my own Public Modulus, Public Exponent & Private Exponent in the hexdecimal format. Continue reading

Generating a MD5 Checksum With Powershell

Recently, I was comparing .wim file images used for PXE booting and installing Operating System Images using SCCM OSD.  I was found that I received a Winload.exe boot problem when trying to build devices off a remote server.  The .wim file it was using looked the correct size in bytes, but generating an MD5 checksum against it showed that the copy on the remote server was different from the source .wim file.

Please find the Powershell function below to generate an MD5 against a file.

Function Get-Hash($file){
    $algo = [System.Security.Cryptography.HashAlgorithm]::Create("MD5")
    $stream = New-Object System.IO.FileStream($file, [System.IO.FileMode]::Open)
    $md5StringBuilder = New-Object System.Text.StringBuilder
    $algo.ComputeHash($stream) | % { [void] $md5StringBuilder.Append($_.ToString("x2")) }

SCCM Client 32bit Client Stopping Registry Keys In SYSWOW64 Context Only Using SYSNATIVE


I use SCCM, Operating System Deployment (OSD) and Microsoft Deployment Toolkit (MDT) 2010 update 1 to deploy Windows 7 SP1 (x64) and application installs during the build process.  The problem was a .vbs script which populates some auto-logon keys called via SCCM OSD during the application installation process was being hit with registry redirection, forcing any registry entries to go into
HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\WinLogon
rather than HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon. Continue reading

Windows 7, Windows XP Enable A Domain Or Local Auto Log On Via Registry Keys

Within Windows it is sometimes necessary for a device to automatically log on, without prompting a user for a user id or password.  This could be for the purpose of running a device as a kiosk, where a the device starts auto logs on and then the kiosk application loads full screen without any user interaction.  There are obvious security issues with this, and to keep this article simple and concise lets ignore these for the time being. This article shows how it is possible with adding the appropriate registry keys. Continue reading

C# .NET Datagrid – Events Don’t Trigger For Check Boxes Within A DataGrid


I had a datagrid which contains a check box in column one. I wanted to trigger an event when any of the check boxes in column one were selected within the datagrid. This should be quite easy to achieve using the CellValueChanged event, however this would only fire on clicking the check box before the check (tick) had appeared. This would mean that when enumerating each line the check box would still not have a checked item and therefore this would not be what I had expected.


I found that in addition to the CellValueChanged event I needed to also have an event Cell_ContactClick as below

private void dataGridViewMain_CellContentClick(object sender, DataGridViewCellEventArgs e)

I assume CommitEdit states that I have finished editing, now commit the changes straight away and therefore the CellValueChanged is fired again after the check mark has had a chance to appeared in the check box., after which my enumerating each line for a check box would work.