KB: How to install Tor as a Windows Service

sc create [service_name] binPath= “C:\Tor\App\tor.exe –nt-service -f C:\Tor\Data\Tor\torrc”

  • Important: must leave a space after binPath=
Advertisements

KB: How to create a web server SSL certificate with makecert.exe

Assuming you have the signing certificate and private key in the “Personal” cert store of the current user.

makecert.exe -is my -ir CurrentUser -in “signing_cert_name” -pe -n CN=”host.jeffchiu.com” -eku 1.3.6.1.5.5.7.3.1 -ss my -sr CurrentUser -sky exchange -m 12

  • -is:    Issuer’s certificate store name.
  • -ir:    Issuer’s certificate store location.
  • -in:    Issuer’s certificate common name.
  • -pe:    Mark generated private key as exportable.
  • -n:    Certificate subject X500 name.
  • -eku:    Comma separated enhanced key usage OIDs.
    • 1.3.6.1.5.5.7.3.1    :    Server Authentication
    • 1.3.6.1.5.5.7.3.2 :    Client Authentication
  • -sky:    Subject key type.
  • -ss:    Subject’s certificate store name that stores the output certificate.
  • -sr:    Subject’s certificate store location.
  • -m:    The number of months for the cert validity period

KB: How to create a Windows 7/Windows 8 Azure VM

Step 1: Prepare the Windows 7/Windows 8 .vhd image

  1. Install Windows 7 on a Hyper-V virtual machine
    1. [IMPORTANT] Create .vhd virtual hard disk insteadl of .vhdx. Azure VM doesn’t support .vhdx.
    2. [IMPORTANT] Install Enterprise edition so the image can be activated when provisioned in Azure.
    3. [IMPORTANT] Enable Remote Desktop (Updated 2013/10/3: It will be enabled by default when provisioning.)
    4. [IMPORTANT] Create an admin account with password. Otherwise cannot login through Remote Desktop.
  2. SYSPREP the Windows 7/Windows 8 VM
    1. Run C:\WINDOWS\system32\sysprep\sysprep.exe
    2. Select the following options:

    3. Press OK and wait until the VM shutdown.

Step 2: Create the Azure Storage Account (if not exist)

Step 3: Prepare the client machine for uploading the .vhd (if necessary)

  1. Download and install Windows Azure Powershell – http://go.microsoft.com/?linkid=9811175&clcid=0x409
  2. Install the Azure management certificate and private key to User Personal cert store.
  3. Get the Azure subscription ID from the “My Bill” page of the Azure Portal.
  4. Start Windows Azure Powershell
  5. Run Set-AzureSubscription –SubscriptionName YourSubcriptionName –Certificate “file path of the management certificate .cer file” – SubscriptionId YourSubscriptionID

Step 4: Upload the .vhd to Azure Storage

  1. Run Select-AzureSubscription –SubscriptionName YourSubcriptionName
  2. Run Add-AzureVhd -Destination http://{YourAzureStore}.blob.core.windows.net/{YourContainer}/{YourVhd}.vhd -LocalFilePath “file path of the .vhd

Step 5: Create Virtual Machine Image

Step 6: Create Virtual Machine from My Image Gallery