Saturday, December 30, 2017

VPN connectivity to SharePoint server farm in Azure using OpenVPN

Recently I wanted to have a VPN connectivity to one of my SharePoint server farms hosted in Microsoft Azure. Although Microsoft Azure provides VPN gateway options, they were not suitable to this scenario.

Following are the steps I used to configure OpenVPN server

1. Provision Ubuntu VM

image 

2. Configure DNS name for the public IP

  • Select VM
  • Click on Public IP Address
  • Assign DNS address

image

3. Configure Inbound Security Rule

  • Allow UDP 1194

image

4. Connect to VM using PuTTY, update and upgrade

  • sudo su
  • apt-get update
  • apt-get upgrade

5. Install OpenVPN

  • Run following configuration script. You can get more information from this location
  • wget https://git.io/vpn -O openvpn-install.sh && sudo bash ./openvpn-install.sh

6.  Configure OpenVPN

  • IP : Provide default local IP address
  • Protocol : UDP
  • Port : 1194
  • DNS : Current system resolver
  • Specify external IP if the server is behind NAT : the DNS address we have assigned to our public IP (in step 2)

7. Download the  client.ovpn file using FileZilla

image

8. Download and configure VPN client (Windows)

image

9. Place the downloaded ovpn configuration in “C:\Program Files\OpenVPN\config” directory

image

10. Connect using OpenVPN GUI

image

image

image

Now I’m able to create a VPN connection to my SharePoint environment hosted in Azure. I can  access the environment using different platforms (Linux PC, Mobile devices, etc ..) by connecting via respective OpenVPN clients

Friday, December 15, 2017

SharePoint framework– “Syntax error: Unexpected token = ” for Yeoman SharePoint Generator

When I executed “yo @microsoft/sharepoint” to generate a SharePoint extension, I got following error message

image

Attempt - 01

First I tried to uninstall and install SharePoint Framework Yeoman generator by executing following command

npm uninstall -g generator-@microsoft/generator-sharepoint

npm install -g @microsoft/generator-sharepoint

This could not resolve the issue

Attempt - 02

Tried uninstalling and installing both Gulp and Yeoman using following commands

npm uninstall -g gulp

npm uninstall –g yeoman

npm install -g yo gulp

Still the issue persisted

Attempt – 03 (Success!!)

  • Uninstall Gulp and yeoman

npm uninstall -g gulp

npm uninstall –g yeoman

  • Uninstall NodeJs
  • Install NodeJS v6.11.5
  • Install Gulp and Yeoman

npm install -g yo gulp

  • Install Yeoman generator

npm install -g @microsoft/generator-sharepoint

That’s it.