We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda CloudGen Firewall

How to Configure the Azure Connectivity Agent

  • Last updated on

The Azure Connectivity Agent allows you to use the Barracuda CloudGen Firewall in the Azure Cloud as the default gateway for your Windows Server Azure VMs. The Connectivity Agent must be installed on all VMs in the VNET that initiate outgoing connections.

Before You Begin

  • Deploy your Barracuda CloudGen Firewall in the Azure Cloud. 
  • Deploy your Windows Server VMs in the same subnet(s) as the CloudGen Firewall.
  • Create a Folder on the Windows Server VM and add the following files:
    • A PFX client certificate for each Windows Server VM. For more information, see How to Create Certificates with XCA.
    • Create a PowerShell script file AzureConnectivityAgent.ps1 and copy the deployment script below.
    • Barracuda Network Access Client version 3.6 HF104 x64 or later. To download the Network Access Client, go to the Barracuda Download Portal.
  • Create a client-to-site VPN on the Barracuda CloudGen Firewall. Verify that it can be reached from the subnets where the Windows Server VMs are located. For more information, see Client-to-Site VPN.
  • (optional) Lock down the private subnets with Azure Network Security Groups to make sure outgoing traffic is sent through only the firewall.

Example Azure Connectivity Deployment Script

Use the PowerShell script below to deploy the VPN client as a service on your Windows Server VM in Azure.

# ================================================================================
#
# Barracuda Azure Connectivity Agent Configuration and Setup Tool
# Copryright (C) 2014 Barracuda Networks, Inc.
#
# Version: 1.0.42
#
# ================================================================================

<#
.SYNOPSIS
Barracuda Azure Connectivity Agent Configuration and Setup Tool

.DESCRIPTION
Creates a customized configuration file (customer.inf) for silent installation of the Barracuda Azure Connectivity Agent and/or installs the software based on the given configuration file.
The parameters required to generate the configuration file can either be specified directly by using the appropriate parameters or by answering the respective questions at the command prompt.

.PARAMETER PfxFileName
The file name of the PFX container that contains an appropriate certificate/private key (X.509) used for establishing a VPN connection.

.PARAMETER ConfigureOnly
Generates a new configuration file for silent installation, but does not start installation of the Barracuda Azure Connectivity Agent software.
If neither -ConfigureOnly nor -InstallOnly is specified, the installation process will be started immediately after a new configuration file has been generated.

.PARAMETER InstallOnly
Installs the Barracuda Azure Connectivity Agent software by using the current configuration file.
If neither -ConfigureOnly nor -InstallOnly is specified, the installation process will be started immediately after a new configuration file has been generated.

.PARAMETER PfxFilePassword
The password required to open the give PFX container file.

.PARAMETER ProfileDescription
The description of the VPN profile.

.PARAMETER ServerAddress
The IP address or hostname of the VPN server to which a VPN tunnel should be established.

.PARAMETER TunnelMode
The Tunnel mode which should be used.
Possible values are: TCP, UDP, Hybrid

.PARAMETER EncryptionAlgorithm
The encryption algorithm which should be used for the VPN tunnel.
Possible values are: None, AES, AES256, Blowfish, CAST, DES, 3DES

.PARAMETER HashAlgorithm
The hash algorithm which should be used for the VPN tunnel.
Possible values are: None, MD5, SHA1

.EXAMPLE
.\AzureConnectivityAgent.ps1 johndoe.pfx -PfxFilePassword mysecret -ProfileDescription ConnectivityAgent -ServerAddress vpn.acme.org -TunnelMode TCP -EncryptionAlgorithm AES256 -HashAlgorithm SHA1

Generates a new configuration file based on a given (password-protected) PFX container file and a given set of VPN profile parameters.
After the configuration file has been generated, the installation process will be started immediately.

.EXAMPLE
.\AzureConnectivityAgent.ps1 -ConfigureOnly johndoe.pfx -PfxFilePassword mysecret

Generates a new configuration file based on a given (non-password protected) PFX container file.
VPN profile parameters are collected interactively at the command prompt by answering the respective questions.

.EXAMPLE
.\AzureConnectivityAgent.ps1 -InstallOnly johndoe.pfx -PfxFilePassword mysecret

Starts the installation process by using a given (password-protected) PFX container file and the current configuration file.
#>

param(
[switch]$ConfigureOnly,
[switch]$InstallOnly,
[Parameter(Mandatory=$True)]
[string]$PfxFileName,
[string]$PfxFilePassword,
[string]$ProfileDescription,
[string]$ServerAddress,
[ValidateSet('TCP','UDP','Hybrid')]
[string]$TunnelMode,
[ValidateSet('None','AES','AES256','Blowfish','CAST','DES','3DES')]
[string]$EncryptionAlgorithm,
[ValidateSet('None','MD5','SHA1')]
[string]$HashAlgorithm
)

$placeholders = "&:description:&", "&:server:&", "&:mode:&","&:encryption:&", "&:hash:&", "&:certname:&","&:certserialnumber:&", "&:certissuer:&", "&:certissuerX500:&"
$phDescription = $placeholders[0]
$phServer = $placeholders[1]
$phMode = $placeholders[2]
$phEncryption = $placeholders[3]
$phHash = $placeholders[4]
$phCertname = $placeholders[5]
$phCertserialnumber = $placeholders[6]
$phCertissuer = $placeholders[7]
$phCertissuerX500 = $placeholders[8]

$scriptName = $MyInvocation.MyCommand.Name
$scriptDir = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
$pfxFullFilePath = Join-Path $scriptDir $PfxFileName
$infFullFilePath = Join-Path $scriptDir "customer.inf"

$tunnelModeId = 0
$encryptionAlgorithmId = 0
$hashAlgorithmId = 0
$certName = ""
$certSerial = ""
$certIssuer = ""
$certIssuerName = ""

function AskTunnelMode()
{
$result = 3
$c1 = New-Object System.Management.Automation.Host.ChoiceDescription "Reliability (&TCP)","Reliability (TCP)"
$c2 = New-Object System.Management.Automation.Host.ChoiceDescription "Response (&UDP)","Response (UDP)"
$c3 = New-Object System.Management.Automation.Host.ChoiceDescription "Optimized (&Hybrid)","Optimized (Hybrid)"
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($c1,$c2,$c3)
$caption = "Tunnel mode"
$result = $Host.UI.PromptForChoice($caption, "", $choices, 2) # 'Hybrid' is default
If($result -eq 0) { $result = 1 } # TCP
ElseIf($result -eq 1) { $result = 2 } # UDP
ElseIf($result -eq 2) { $result = 3 } # Hybrid
return $result
}

function ParseTunnelMode($tm)
{
$str = $tm.ToUpperInvariant()
If($str -eq "TCP")
{
return 1
}
ElseIf($str -eq "UDP")
{
return 2
}
ElseIf($str -eq "HYBRID")
{
return 3
}
Else
{
Throw "Invalid Tunnel mode"
}
}

function AskEncryptionAlgorithm()
{
$result = 4
$c1 = New-Object System.Management.Automation.Host.ChoiceDescription "&None","No encryption"
$c2 = New-Object System.Management.Automation.Host.ChoiceDescription "&AES","AES"
$c3 = New-Object System.Management.Automation.Host.ChoiceDescription "AES&256","AES256"
$c4 = New-Object System.Management.Automation.Host.ChoiceDescription "&Blowfish","Blowfish"
$c5 = New-Object System.Management.Automation.Host.ChoiceDescription "&CAST","CAST"
$c6 = New-Object System.Management.Automation.Host.ChoiceDescription "&DES","DES"
$c7 = New-Object System.Management.Automation.Host.ChoiceDescription "&3DES","3DES"
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($c1,$c2,$c3,$c4,$c5,$c6,$c7)
$caption = "Encryption algorithm"
$result = $Host.UI.PromptForChoice($caption, "", $choices, 1) # 'AES' is default
If($result -eq 0) { $result = 1 } # None
ElseIf($result -eq 1) { $result = 4 } # AES
ElseIf($result -eq 2) { $result = 64 } # AES256
ElseIf($result -eq 3) { $result = 16 } # Blowfish
ElseIf($result -eq 4) { $result = 8 } # CAST
ElseIf($result -eq 5) { $result = 32 } # DES
ElseIf($result -eq 6) { $result = 2 } # 3DES
return $result
}

function ParseEncryptionAlgorithm($ea)
{
$str = $ea.ToUpperInvariant()
If($str -eq "NONE")
{
return 1
}
ElseIf($str -eq "AES")
{
return 4
}
ElseIf($str -eq "AES256")
{
return 64
}
ElseIf($str -eq "BLOWFISH")
{
return 16
}
ElseIf($str -eq "CAST")
{
return 8
}
ElseIf($str -eq "DES")
{
return 32
}
ElseIf($str -eq "3DES")
{
return 2
}
Else
{
Throw "Invalid Encryption algorithm"
}
}

function AskHashAlgorithm()
{
$result = 1
$c1 = New-Object System.Management.Automation.Host.ChoiceDescription "&None","No hash"
$c2 = New-Object System.Management.Automation.Host.ChoiceDescription "&MD5","MD5"
$c3 = New-Object System.Management.Automation.Host.ChoiceDescription "&SHA1","SHA1"
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($c1,$c2,$c3)
$caption = "Hash algorithm"
$result = $Host.UI.PromptForChoice($caption, "", $choices, 1) # 'MD5' is default
If($result -eq 0) { $result = 3 } # None
ElseIf($result -eq 1) { $result = 1 } # MD5
ElseIf($result -eq 2) { $result = 2 } # SHA1
return $result
}

function ParseHashAlgorithm($ha)
{
$str = $ha.ToUpperInvariant()
If($str -eq "NONE")
{
return 3
}
ElseIf($str -eq "MD5")
{
return 1
}
ElseIf($str -eq "SHA1")
{
return 2
}
Else
{
Throw "Invalid Hash algorithm"
}
}


function ExtractCertificateData()
{
If($PfxFilePassword)
{
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($pfxFullFilePath, $PfxFilePassword)
}
Else
{
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($pfxFullFilePath)
}

Write-Host "========================"
Write-Host "Certificate information:"
Write-Host "========================"

$subject = $cert.Subject
Write-Host -NoNewLine "Subject: "
Write-Host -fore Yellow $subject

$script:certName = $cert.GetNameInfo([System.Security.Cryptography.X509Certificates.X509NameType]::SimpleName, $False)
Write-Host -NoNewline "Name: "
Write-Host -fore Yellow $certName

$script:certIssuer = $cert.GetNameInfo([System.Security.Cryptography.X509Certificates.X509NameType]::SimpleName, $True)
Write-Host -NoNewline "Issuer "
Write-Host -fore Yellow $certIssuer

$script:certIssuerName = $cert.GetIssuerName()
Write-Host -NoNewline "Issuer name: "
Write-Host -fore Yellow $certIssuerName

$notbefore = $cert.NotBefore
Write-Host -NoNewLine "Valid from: "
Write-Host -fore Yellow $notbefore

$notafter = $cert.NotAfter
Write-Host -NoNewLine "Valid to: "
Write-Host -fore Yellow $notafter

$script:certSerial = $cert.GetSerialNumberString().ToLowerInvariant()
Write-Host -NoNewline "Serial number: "
Write-Host -fore Yellow $certSerial

$thumbprint = $cert.Thumbprint
Write-Host -NoNewLine "Thumbprint: "
Write-Host -fore Yellow $thumbprint
Write-Host
}

function GenerateConfigFile()
{
$template = "OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KOyBjdXN0b21lci5pbmYNCjsNCjsgQ3VzdG9tZXIgSW5zdGFsbCBGaWxlDQo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($template)
Set-Content -Path $infFullFilePath -Value $data -Encoding Byte
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phDescription, $ProfileDescription} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phServer, $ServerAddress} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phMode, $tunnelModeId} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phEncryption, $encryptionAlgorithmId} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phHash, $hashAlgorithmId} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phCertname, $certName} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phCertserialnumber, $certSerial} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phCertissuer, $certIssuer} | Set-Content $infFullFilePath
(Get-Content $infFullFilePath) | Foreach-Object {$_ -replace $phCertissuerX500, $certIssuerName} | Set-Content $infFullFilePath
}

function GetProfileData()
{
if(!$ProfileDescription -or !$ServerAddress -or !$TunnelMode -or !$EncryptionAlgorithm -or !$HashAlgorithm)
{
Write-Host "Please answer the following questions to complete your configuration file:"

If(!$ProfileDescription)
{
Write-Host -NoNewLine "Profile description: "
$script:ProfileDescription = Read-Host
If(!$ProfileDescription)
{
$script:ProfileDescription = "default"
}
}

If(!$ServerAddress)
{
Write-Host -NoNewLine "VPN server address/hostname: "
$script:ServerAddress = Read-Host
If(!$ServerAddress)
{
$script:ServerAddress = "vpnserver"
}
}

If(!$TunnelMode)
{
$script:tunnelModeId = AskTunnelMode
}

If(!$EncryptionAlgorithm)
{
$script:encryptionAlgorithmId = AskEncryptionAlgorithm
}

If(!$HashAlgorithm)
{
$script:hashAlgorithmId = AskHashAlgorithm
}
}
}

function IsConfigFileValid()
{
If(!(Test-Path $infFullFilePath))
{
return $False
}

$file = Get-Content $infFullFilePath
Foreach($element in $placeholders)
{
$contains = $file | %{$_ -match $element}
if($contains -contains $True)
{
return $False
}
}

return $True
}


function ImportCertificate()
{
If(Get-Command -CommandType Cmdlet -Module PKI Import-PfxCertificate -errorAction SilentlyContinue)
{
# starting with Windows Server 2012, private keys may also be protected to security principals
Write-Host "Using 'Import-PfxCertificate' for certificate import..."
If($PfxFilePassword)
{
$pfxSecureFilePassword = ConvertTo-SecureString $PfxFilePassword -AsPlainText -Force
Import-PfxCertificate $PfxFileName -CertStoreLocation cert:\localMachine\my -Password $pfxSecureFilePassword
}
Else
{
Import-PfxCertificate $PfxFileName -CertStoreLocation cert:\localMachine\my
}
}
Else
{
Write-Host "Using 'certutil' for certifcate import..."
If($PfxFilePassword)
{
certutil -f -p $PfxFilePassword -importPFX $PfxFileName
}
Else
{
certutil -f -importPFX $PfxFileName
}

If($LASTEXITCODE -ne 0)
{
Throw ""
}
}
}

function StartSetup()
{
.\setup.exe /s /v"/qr CUSTOMER_INF=customer.inf PROGTYPE=VPN"
# .\setup.exe /s /v"/qr CUSTOMER_INF=customer.inf PROGTYPE=VPN /Lecumwvario setup.log"
}

function RemoveFileIfExists($file)
{
Remove-Item -Force $file -errorAction SilentlyContinue
}

function RunConfigMode()
{
Write-Host "Entering configuration mode..."

Try
{
ExtractCertificateData
Try
{
GetProfileData
Try
{
GenerateConfigFile
Write-Host "Configuration file has successfully been generated."
}
Catch
{
RemoveFileIfExists($infFullFilePath)
Write-Error "Configuration file could not be generated!"
}
}
Catch
{
Write-Error "Profile data could not be retrieved!"
}
}
Catch
{
Write-Error "Certificate data could not be extracted!"
}
}

function RunInstallMode()
{
Write-Host "Entering install mode..."

If(!(IsConfigFileValid))
{
Write-Error "Invalid configuration file!"
return
}

Try
{
ImportCertificate
Write-Host "Certificate has successfully been imported."

Try
{
StartSetup
}
Catch
{
Write-Error "Setup could not be started!"
}
}
Catch
{
Write-Error "Certificate could not be imported!"
}
}

Write-Host "==============================================================================="
Write-Host "Welcome to the Barracuda Azure Connectivity Agent Configuration and Setup Tool!"
Write-Host "==============================================================================="
Write-Host

If($TunnelMode)
{
$tunnelModeId = ParseTunnelMode($TunnelMode)
}
If($EncryptionAlgorithm)
{
$encryptionAlgorithmId = ParseEncryptionAlgorithm($EncryptionAlgorithm)
}
If($HashAlgorithm)
{
$hashAlgorithmId = ParseHashAlgorithm($HashAlgorithm)
}

If($ConfigureOnly -and !$InstallOnly)
{
RunConfigMode
}
ElseIf(!$ConfigureOnly -and $InstallOnly)
{
RunInstallMode
}
Else
{
RunConfigMode
RunInstallMode
}

# SIG # Begin signature block
# MIIY+gYJKoZIhvcNAQcCoIIY6zCCGOcCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUb+CXvjGrJJqKUJB+iqTELi58
# 1dWgghPqMIID7jCCA1egAwIBAgIQfpPr+3zGTlnqS5p31Ab8OzANBgkqhkiG9w0B
# AQUFADCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIG
# A1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhh
# d3RlIENlcnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcg
# Q0EwHhcNMTIxMjIxMDAwMDAwWhcNMjAxMjMwMjM1OTU5WjBeMQswCQYDVQQGEwJV
# UzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xMDAuBgNVBAMTJ1N5bWFu
# dGVjIFRpbWUgU3RhbXBpbmcgU2VydmljZXMgQ0EgLSBHMjCCASIwDQYJKoZIhvcN
# AQEBBQADggEPADCCAQoCggEBALGss0lUS5ccEgrYJXmRIlcqb9y4JsRDc2vCvy5Q
# WvsU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QDEydTeW1hbnRlYyBUaW1lIFN0YW1waW5nIFNlcnZpY2VzIENBIC0gRzIC
# EA7P9DjI/r81bgTYapgbGlAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkq
# hkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE1MDYxNjE0NDMzOFowIwYJKoZIhvcN
# AQkEMRYEFCPrcU08iLooi805klrLl/J9boEnMA0GCSqGSIb3DQEBAQUABIIBAEtm
# rlO04zf17KQkklo8EJRRynRRNX4uZJFDvypxX6+i+SSfHHbTOhRGzschqIpxzWTR
# u6ULda+LGC/AxaX/Y8YiWlIWVTI3ZG3qHeUawLVV1vBMBm3T3aGhbobZSLnHOlVM
# FgB6wrqlBy6Lydv5sLSKhKsISa4uVoobZUuQS7TGfW5bg+Z6zJE1Xe5wxhSmZZZx
# 09Q9pQfoHsL4slYPp6OB2vgvqlAk9GayYV7iFmmf8XYCEh2NCUuk7k2WbKE6r13m
# TVe5+NalODPJRQ7rKBcN2eXO/bjJzJQ5PwFQn4wGgxPCloAeFcg89dVnwZhtHBIW
# ixWKeKl+ktI+evwo3t8=
# SIG # End signature block

Install the Azure Connectivity Agent

The PowerShell script provided to configures and silently installs the Azure Connectivity Agent by supplying the PFX container file and the VPN profile parameters.

  1. Open a Windows PowerShell with Administrator privileges on the Windows server VM.
  2. Change to the directory you created containing the Network Access Client, PFX client certificate, and AzureConnectivityAgent.ps1 PowerShell script.
  3. Start the installation of the Azure Connectivity Agent.

    C:\Azure>.\AzureConnectivityAgent.ps1 johndoe.pfx -PfxFilePassword mysecret -ProfileDescription ConnectivityAgent -ServerAddress vpn.acme.org -TunnelMode TCP -EncryptionAlgorithm AES256 -HashAlgorithm SHA1
  4. The installation of the Barracuda Network Access Client 3.6 x64 completes without the need for further user interaction.

Display All Azure Connectivity Agent Options

For a list of all available options, enter:

C:\Azure>.\Get-Help AzureConnectivityAgent.ps1 -full
Last updated on