Tag: Virtual Network

Connect Ubiquiti UniFi Dream Machine to Azure VPN

Connect Ubiquiti UniFi Dream Machine to Azure VPN

A couple of days ago I got a Ubiquiti UniFi Dream Machine, which is an all-in-one device with an access point, 4-port switch, and a security gateway. After the basic setup, I wanted to connect my Ubiquiti UniFi Dream Machine USG to an Azure VPN Gateway (Azure Virtual Gateway), using Site-to-Site VPN. In this blog post, I am going to show you how you can create a site-to-Site (S2S) VPN connection from your Ubiquiti UniFi Dream Machine to Azure Virtual Network Gateway.

Azure Virtual Network Gateway and Connection

I already have a virtual network in Azure with the address space 10.166.0.0/16, and I also deployed the Azure Virtual Network Gateway connected to that vNet. The next thing I did was to add a connection to the gateway.

Azure VPN Connection

Azure VPN Connection

You need the following:

  • Name for the connection
  • Set Connection type to Site-to-site (IPSec)
  • Create a local network gateway (basically the configuration of your local VPN gateway.
  • Define a shared secret

Configure Ubiquiti UniFi Dream Machine VPN connection

Now you can switch to your UniFI Dream Machine, which has an UniFI USG integrated. Under settings go to Networks and click on Create new Network

UniFi Network Azure VPN

UniFi Network Azure VPN

Here you configure the following:

  • Name of your VPN connection
  • VPN Type Manuel IPSec
  • Remote Subnets which is the Azure vNet address space (in my case 10.166.0.0/16)
  • Peer IP which is the public IP address of the Azure virtual network gateway
  • Local WAN IP
  • the pre-shared key (shared secret)
  • IPSec Profile: Customized
  • Key Exchange Version: IKEv2
  • Encryption: AES-256
  • Hash: SHA1
  • DH Group: 2

After that, the VPN will connect and the status of your Azure virtual network gateway connection will change to connected.

Dream Machine Azure VPN Connection

Dream Machine Azure VPN Connection

You can now reach your Azure virtual machine using the private IP address range.

Connected Azure VPN

Connected Azure VPN

I hope this was helpful and show you how you can connect a Ubiquiti Unifi Dream Machine (USG) to an Azure Virtual Network using a site-to-site VPN connection. If you want to learn more about Azure Virtual Network Gateways check out the following documentation:

If you want to know more about point-to-site VPN connection to Azure check out my blog posts:

If you have any questions, feel free to leave a comment.



Cisco UCS Hyper-V Cluster – Configure Hyper-V Networks – Part 5

This How-To shows you how you configure the (Virtual) Network Adapters of the Hyper-V Servers. This is not really heavy, but to complete the UCS Hyper-V Guide I post this. If you use Microsoft System Center Virtual Machine Manager 2008 R2 you will find later a post about doing this in SCVMM 2008 R2.

  1. Connect to the Hyper-V Server with the Hyper-V Manager Console
    Hyper-V Manager
  2. Now you can configure the Networks under Virtual Network Manager on each Hyper-V Host.
    Hyper-V Virtual Network ManagerWhat we did is, we added 7 (Virtual) Network adapters to the UCS Bladenodes in the UCS Manager. We added the same on Configuration on the Blades which are using VMware ESXi and on the Blades with Microsoft Hyper-V and thats why we have a Network called vMotion on the Hyper-V Servers. We use the vMotion network adpater for the private Failover Cluster Heartbeat.

Basically we have the following Networks:

UCS Blade Server Networks

  • 1. Network adapter is the Hyper-V Management Network dedicated to the Hyper-V Node
  • 2. Network adpater for Hyper-V Cluster Live Migration
  • 3. Network adapter for private Failover Cluster Heartbeat
  • 4. Network adapter External Network, is used for our main external Network
  • 5. Network adapter Internal Network, is used for our internal Management Network for Servers
  • 6. and 7. Network adapters are used for VLAN Trunks

To get the best performance we don’t share any Network Adapter with the Hyper-V Host and a Virtual Network.