Jump to content
Not connected, Your IP: 18.190.153.77
Mikeyy

How-to: AirVPN on Synology DSM6 and DSM7 complete guide

Recommended Posts

On 2/13/2017 at 10:14 PM, _sinnerman_ said:

 

I think this config does not affect ipv6 at all -- so just a warning for others: you might have ipv6 traffic leaking around the VPN.


I'm running DSM 6.2.2-24922 Update 4 and have installed AirVPN
I then used the synology as a Proxy and used the website https://whatismyipaddress.com/
The web site identified my ISP and location from the IP V6 address. It would seem that the OpenVPN client version (2.3) on the NAS is the issue.

I then went into my Synology Network settings and disabled IP V6 completely. The web site then correctly showed the AirVPN details only.

Just adding this to the discussion so that people can take appropriate IP V6 actions.

Share this post


Link to post
@TToD Were you able to use Download Station and Cloud station (backups) with Air? It tried a while ago but it did not work and I had to use another one. But I'd like to know if there's new setup that does work.

Share this post


Link to post
12 hours ago, regvpn said:
@TToD Were you able to use Download Station and Cloud station (backups) with Air? It tried a while ago but it did not work and I had to use another one. But I'd like to know if there's new setup that does work.
I don't use Download Station.
I use Cloud Station on my NAS for local backups only, I don't access that over the internet. Locally it works fine.

Share this post


Link to post
On 1/21/2020 at 8:04 PM, regvpn said:
@TToD Were you able to use Download Station and Cloud station (backups) with Air? It tried a while ago but it did not work and I had to use another one. But I'd like to know if there's new setup that does work.
On 1/22/2020 at 8:30 AM, TToD said:
I don't use Download Station.
I use Cloud Station on my NAS for local backups only, I don't access that over the internet. Locally it works fine.

DS and CS can be used without problems. Check number 3.

You need to enable port forward on your router, forward those ports, and know your REAL ISP IP.
For ISP IP, it's easier to use Dynamic DNS. Asus routers provide their own free DDNS sevice for example.

When you setup DDNS and port forwarding, and finish step 3., then you can access your Synology even when AirVPN is running, for example: https://mydomain.com:5001 for GUI or https://mydomain.com:6690 for Drive/Cloud station via desktop app.
Here is list of ports used by Synology device: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/Network/What_network_ports_are_used_by_Synology_services

Share this post


Link to post

Hello everyone.

Just updated first and second page of tutorial.

What's new:
- Changed reconnect script a bit and included 2 kill switches for old connections since sometimes it happened that Synology wasn't able to reconnect for some reason. My guess was that old connection wasn't killed properly. Hopefully this will fix it.
- Changed whole section with reconnect script since with new Synology upgrades we no longer need SSH connections, Putty and manual editing of crontab. Now it's super easy to enable user scripts in synology. Old tutorial is now available in second post as backup.
- Updated some parts of certificate generate part since AirVPN changed their interface since I made this tutorial.

Good luck everyone. If you have any comments or want to include something in tutorial, leave a message.

Share this post


Link to post

Hi,
I was womdering if anyone has tried installing a 2.4 version of OpenVPN client o their Synology to replace the obsolete 2.3.11.
The Synology forums are a joke as as Synology don't respond to queries, there are posts there that are several years old asking for 2.4 but nothing happens.

Share this post


Link to post

Hello,
I'm currently running DSM 6.2.3-25426 Update 2 which has AirVPN running and I have also loaded the AutoReconnection script above.

However I seem to be getting a lot of false positives for the VPN being down when the script runs, with the result that the script kills my session session and attempts restarts it. So for the period where the VPN is down I am exposed, uunfortunatewly my router is not one that can be configured to block leaks.

It mostly happens when I am downloading but to a much lesser extent when I am just downloading.
Sereral times I have turned off the script for a large download and the VPN is rock solid. I would obviously like to keep the script for the occasional time when the VPN is genuinely down.
Any suggestions to eliminate this false positive would be appreciated.

 

Share this post


Link to post

Script checks your connection in 2 ways. First it check if VPN tunnel is up. Second, it pulls your IP from external site. If it can contact external site and pull your IP from it, then connection is ON. If it doesn't get reply in time (5 seconds) which can happen, or if external site is down, then it will think your VPN is down and restart it.

You can increase time it waits for reply (for example to 10 seconds) and/or change site it contacts. You have commented out lines with different sites already in script.

For example, you can change these lines to values 10 and 12:
PUBIP=$(curl -s -m 10 icanhazip.com)
.
.
.
sleep 12

Share this post


Link to post

Hello,
Thanks for the modifications.
My system was completly stable for a number of weeks with no false positives.

Unfortunately I say "was". I recently made a change of my DSM version from 6.2.3-25426 Update 2  to 6.2.3-25426 Update 3.
After this the VPN is up and down like a yoyo (every 10 to 15 mins). The restart is occuring because PUBIP=$(curl -s -m 10 icanhazip.com)  is returning a blank, I even tried increasing the timeout to -m 15.

But given the DSM update I did I would say the issue is there rather than the script :-(.

 

Share this post


Link to post
11 hours ago, TToD said:

Hello,
Thanks for the modifications.
My system was completly stable for a number of weeks with no false positives.

Unfortunately I say "was". I recently made a change of my DSM version from 6.2.3-25426 Update 2  to 6.2.3-25426 Update 3.
After this the VPN is up and down like a yoyo (every 10 to 15 mins). The restart is occuring because PUBIP=$(curl -s -m 10 icanhazip.com)  is returning a blank, I even tried increasing the timeout to -m 15.

But given the DSM update I did I would say the issue is there rather than the script :-(.

 

It's possible that icanhazip.com isn't working properly.
You can use different service, there are already two more in script, or you can add new one your self.

Just comment line with icanhazip.com with # and uncomment line from one other provider by removing # before code.

Share this post


Link to post
On 1/24/2021 at 8:50 PM, TToD said:

After this the VPN is up and down like a yoyo (every 10 to 15 mins). The restart is occuring because PUBIP=$(curl -s -m 10 icanhazip.com)  is returning a blank, I even tried increasing the timeout to -m 15.


Try other URLs like https://www.nsupdate.info/myip.

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post
Posted ... (edited)
On 11/22/2020 at 10:53 PM, Mikeyy said:

Hi,
Just to close my issue off.
I have used another URL and system stability has been restored.
I added some diagnostic output to the script so that if the VPN looks down then $(curl -s -m 10 .....) from multiple URLs are output to the log file.
I did have one down event and all the URLs returned blank which says to me that the VPN was genuinely down and needed restarting.
All is good in my world now 🙂
Thanks for all the help.

My appologies but something weird happened with my post.
My text now appears as if it is quoting Mikeyy which is not the case.
Appologies for the confusion

Edited ... by TToD
Something weird happened

Share this post


Link to post
On 2/1/2021 at 11:49 PM, TToD said:

My appologies but something weird happened with my post.
My text now appears as if it is quoting Mikeyy which is not the case.
Appologies for the confusion


Yeah, the editor does this sometimes.
Good to know the issue is resolved :)

NOT AN AIRVPN TEAM MEMBER. USE TICKETS FOR PROFESSIONAL SUPPORT.

LZ1's New User Guide to AirVPN « Plenty of stuff for advanced users, too!

Want to contact me directly? All relevant methods are on my About me page.

Share this post


Link to post

Sorry about that, buy I usually don't upgrade to new major DSM version for 3-6 months after release (until they iron out bugs), so I will not be able to test it for some time.
Maybe it's just .ovpn config file problem. Did you try generating new file for different openvpn versions?

Share this post


Link to post
On 5/23/2023 at 8:10 AM, saudrain said:

Hi All,

After updating DSM 7.2 VPN Open VPN doesn't work.
Anyone does have the same problem ?

Regards


Yes, same problem here. 24 hours ago I was still on DSM 6.2 ;) 

Share this post


Link to post

OK, I was in contact with AirVPN support who were asking for the version of OpenVPN (it's 2.5.8 in DSM 7.2) and also for the OpenVPN log. I couldn't find it and, while googling the subject, came across a post by someone having similar problems with a different VPN provider.

This worked for me:

- Go to the config generator
- Select Router
- Don't click on Advanced, just select UDP 443 (I believe that's selected by default)
- Select your server/country/whatever you like
- Generate the ovpn file

In DSM:

- Create a VPN profile
- Give it a name
- Enter your AirVPN credentials
- Select the ovpn file you just generated
- Click the checkboxes in the next screen
- Click Connect and it should connect... worked here anyway.

This had been driving me nuts for a few hours. I even tried another VPN (free trial) which didn't work, so I was really wondering if the server's VPN module was broken!

Share this post


Link to post
Posted ... (edited)

Hi, I followed every step of the guide, but it doesn't work. I'm using a DSM 7.1.1-42962, DS416play.

 

Well, I tried the previous Router setup. It works!

Edited ... by JusMave

Share this post


Link to post
On 6/10/2023 at 8:40 PM, Mikester said:

OK, I was in contact with AirVPN support who were asking for the version of OpenVPN (it's 2.5.8 in DSM 7.2) and also for the OpenVPN log. I couldn't find it and, while googling the subject, came across a post by someone having similar problems with a different VPN provider.

This worked for me:

- Go to the config generator
- Select Router
- Don't click on Advanced, just select UDP 443 (I believe that's selected by default)
- Select your server/country/whatever you like
- Generate the ovpn file

In DSM:

- Create a VPN profile
- Give it a name
- Enter your AirVPN credentials
- Select the ovpn file you just generated
- Click the checkboxes in the next screen
- Click Connect and it should connect... worked here anyway.

This had been driving me nuts for a few hours. I even tried another VPN (free trial) which didn't work, so I was really wondering if the server's VPN module was broken!

Oh thanks ! 😍

works fine for me !!
get crazy i you click advenced box ....

😁

Share this post


Link to post

Hi, This worked for me a few days ago and now its a no-go. anyone else having serious connectivity issues with synology? anyone else with any other solutions? i still have a different VPN programmed in as well and it connects the first time every time no problems. 
 

On 6/10/2023 at 12:40 PM, Mikester said:

OK, I was in contact with AirVPN support who were asking for the version of OpenVPN (it's 2.5.8 in DSM 7.2) and also for the OpenVPN log. I couldn't find it and, while googling the subject, came across a post by someone having similar problems with a different VPN provider.

This worked for me:

- Go to the config generator
- Select Router
- Don't click on Advanced, just select UDP 443 (I believe that's selected by default)
- Select your server/country/whatever you like
- Generate the ovpn file

In DSM:

- Create a VPN profile
- Give it a name
- Enter your AirVPN credentials
- Select the ovpn file you just generated
- Click the checkboxes in the next screen
- Click Connect and it should connect... worked here anyway.

This had been driving me nuts for a few hours. I even tried another VPN (free trial) which didn't work, so I was really wondering if the server's VPN module was broken!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...