Today I finally solved a technical problem I have had for years and never been able to find a solution for. I first noticed this issue when I began using OpenVPN. I soon discovered that while an OpenVPN connection was active, OneNote would not sync my notebooks.
I then noticed that in all of the other Office 365 applications, such as Word and Excel, when I looked at file -> account it showed that I was not connected to the internet.
Something else I found was that with the OpenVPN connection active I could not access the Microsoft Store and the MSN News app failed to load my personalized preferences and instead defaulted to the app defaults.
So How Did I Fix Windows 10 & Office 365 Not Connecting Over OpenVPN?
I did a lot of searching over the last few years to try and find a fix for this. I found many more people with the problem, and nobody seemed to have the right answer. A few things were suggested, such as disabling IPv6 on the TAP adapter, and a few other little tricks. Absolutely none of them worked.
Today, I was idly digging around for something else, and I came across a web page (I can’t remember which) that explained how Office 365 under Windows 10 uses the Network Location Awareness (NLA) and the Network Connection Status Indicator (NCSI) to discern whether an active network connection is available. Both of these rely on there being a default gateway specified for the current active Internet connection for them to sucesfully report the connection is up.
I fired up a command line, ran an ipconfig and there it was, the TAP adapter had a blank default gateway. At this stage, I figured I knew why Office 365 was unable to connect over my OpenVPN connection. Now all I had to do was come up with a fix.
The Fix for Windows 10 & Office 365 Cannot Connect over OpenVPN
I first took a look at my VPN server settings (I run my own personal VPN on a server in the UK). I couldn’t find anywhere to add a default gateway to the OpenVPN client on initiating a connection. I could find nothing in the OpenVPN client either. And then I had the idea of trying to add a default gateway to the TAP adapter under Windows 10.
This worked perfectly, and the problem is now completely fixed. All Office 365 applications now see an Internet connection when I am connected to OpenVPN. MSN News and the Microsoft Store also work fine over OpenVPN now I have applied this fix.
A Walkthrough of How to Fix Windows 10 & Office 365 Not Connecting Over OpenVPN
Setting a default gateway for the OpenVPN connection, so that Windows 10 and Office 365 can connect is really pretty easy, just follow the steps below:
Step 1 – Open up your list of network adapters and choose the OpenVPN TAP adapter:
Step 2 – Select the TCP/IPv4 protocol and then click on the button titled “properties”:
Step 3 – From the main properties window for the TCP/IPv4 protocol click on the button titled “advanced”:
Step 4 – Now add a new default gateway. In this screenshot I have already added a default gateway of 192.168.0.1:
Windows 10 & Office 365 Cannot Connect over OpenVPN Fixed
Now reconnect to your OpenVPN server using your OpenVPN client, and when you open up any of the Office 365 applications and select file -> account you will see that Office 365 now sees an active Internet connection.
Furthermore, you will now find that OneNote will sync notebooks, Microsoft Store will work, and the MSN News app will load your personalized preferences.
It has taken me years to get around to finding a solution for this problem, and in my search for a solution I have found many other people scratching their heads with the same issue, so I hope this short guide will be useful to them.
Some Final Thoughts on this OpenVPN Fix
Although this fix works, I feel it is a rather inelegant solution, as it requires manually adding the default gateway to the TAP adapter. On further thought, I think it should be possible to have the OpenVPN server set a default gateway for the connection on client connect. This can probably be achieved by changing the OpenVPN config file for the connection in some way.
When I have some free time I will experiment with this and see if I can’t come up with an automatic way for this fix to be applied so that there is no need to manually add the default gateway to the TAP adapter on every PC you need to fix.
- Windows 10 & Office 365 Cannot Connect Over OpenVPN – Fixed! - July 25, 2018
- How Not to Do Facebook Marketing - May 29, 2018
- The Greatest Mistake You Can Make with B2B Social Updates - February 13, 2016