Menu Close

Connect Azure VM to localhost server through EdgeRouter using IPsec IKEv2 protocol

This brief is about a successful site-to-site WAN configuration from my local premise to a VM (Virtual Machine) server hosted on Azure cloud. The step-by-step configuration I followed is here and the VPN device used is through my Edge Router from Ubiquiti, ie a VPN capability of the router itself. At the end, this will create a static route type on a Virtual Tunnel interface on your router.

The vpn setup paired with a validated device (ie Edge Router) was a breeze. The configuration steps consist of a part where you would download a script that you will run on your router on a command line interface. To verify a successful link, check “connected” status on your Azure virtual network gateway and on your local premise end you can do a ping. I did a ping and tracert. Not that I was able to do a ping/tracert from any machine within my network as this setup is a site-to-site.

Screenshot showing 2 steps to verify connection.
Screenshot showing 2 steps to verify connection.


The connection parameters are here shown from command line from my on-premise router:

Connection parameters on local router
Connection parameters on local router

To see the configuration script file from Azure Network Gateway, click here to download the text file.

Further, I checked on the connection logs and verified couple times (before putting down my test/setup) and connection seemed to be stable. I won’t be using these resources and I removed them after about 2 days. Otherwise, charges will accumulate much higher.


0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x