Skip to content

Instantly share code, notes, and snippets.

Andreas Wasita andreaswasita

View GitHub Profile
View Set-AzureSubnetRouteTable.ps1
Set-AzureSubnetRouteTable -VirtualNetworkName USVNET `
-SubnetName Azure-Backend `
-RouteTableName NGFWRouteTable
View Set-AzureRoute.ps1
Get-AzureRouteTable NGFWRouteTable `
|Set-AzureRoute -RouteName NGRoute -AddressPrefix 0.0.0.0/0 `
-NextHopType VirtualAppliance `
-NextHopIpAddress 192.168.0.54
View New-AzureRouteTable.ps1
New-AzureRouteTable -Name NGFWRouteTable `
-Location "West US" `
-Label "Route table for 0.0.0.0/0 Barracuda NG FW"
View Set-AzureIPForwarding_Ethernet.ps1
Get-AzureVM -ServiceName azusfw01 -Name azusfw01 | Set-AzureIPForwarding -NetworkInterfaceName Ethernet1 -Enable -verbose
Get-AzureVM -ServiceName azusfw01 -Name azusfw01 | Set-AzureIPForwarding -NetworkInterfaceName Ethernet2 -Enable -verbose
View Set-AzureIPForwarding.ps1
Get-AzureVM -ServiceName azusfw01 -Name azusfw01 | Set-AzureIPForwarding -Enable
View New-AzureVM_BarracudaNG.ps1
#Your Azure Subscription and Storage Account Details
$subscription = Read-Host -Prompt 'Microsoft Azure Subscription:'
$storage = Read-Host -Prompt 'Storage Account Name:'
#Set Azure Subscription and Storage
Set-azuresubscription -SubscriptionName $subscription -CurrentStorageAccountName $storage
#Barracuda Image - Check whether the image still valid using Get-AzureVMimage
$image = Get-AzureVMImage `
-ImageName "810d5f35ce8748c686feabed1344911c__BarracudaNGFirewall-6.1.1-075-byol"
View New_AzureDedicatedCircuit.ps1
#Import Azure and ExpressRoute Module
Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1'
Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\ExpressRoute\ExpressRoute.psd1'
#Creating a new circuit
$Bandwidth = 200
$CircuitName = "EquinixPublic"
$ServiceProvider = "Equinix"
$Location = "Sydney"
View New_AzureBGPPublic.ps1
#Setting up a bgp session
$ServiceKey = "YourServiceKey"
$PriSN = "192.168.1.4/30"
$SecSN = "192.168.2.4/30"
#You can use Public ASN you own or Private ASN Greater than 65000
$ASN = "YourASN"
$VLAN = "101"
#Create a new bgp peering session
New-AzureBGPPeering -ServiceKey $ServiceKey -PrimaryPeerSubnet $PriSN -SecondaryPeerSubnet $SecSN -PeerAsn $ASN -VlanId $VLAN –AccessType Public
View New_AzureBGPPrivate.ps1
#Setting up a bgp session
$ServiceKey = "YourServiceKey"
$PriSN = "192.168.1.0/30"
$SecSN = "192.168.2.0/30"
#You can use Public ASN you own or Private ASN Greater than 65000
$ASN = "YourASN"
$VLAN = "100"
#Create a new bgp peering session
New-AzureBGPPeering -ServiceKey $ServiceKey -PrimaryPeerSubnet $PriSN -SecondaryPeerSubnet $SecSN -PeerAsn $ASN -VlanId $VLAN –AccessType Private
View lab1-nat_stack.json
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Builds a NAT host. **WARNING** This template creates Amazon EC2 instance(s). You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String",
"MinLength": "1",
You can’t perform that action at this time.