Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
openvpn client service auto restart method? (for site to site)
« previous
next »
Print
Pages: [
1
]
Author
Topic: openvpn client service auto restart method? (for site to site) (Read 2507 times)
chienchou.pan
Newbie
Posts: 19
Karma: 2
openvpn client service auto restart method? (for site to site)
«
on:
January 15, 2021, 07:40:41 am »
Hi sir,
Our company use openvpn server with three WAN lines(different ISP provide[china telecom,china mobile,unicom]) to provide VPN service for each branch offices.
The branch office use openvpn client service to connect to server with two WAN lines(Unicom,China telecom).
But sometimes the network quility is not good, and the client will connect to wrong WAN line then the openvpn connection will lose packages(different ISP's connection is not always good in china).
If the opnsense can build a funtion to
detect the line survival to reconnect to better ISP
in openvpn , or
can provide a cron rule to restart openvpn client service automatically for user define
, thanks.
For example,
headquarter have three WAN Lines to provide openvpn service:
1. china telecom ==> 192.168.1.1
2. unicom telecom ==> 192.168.2.1
3 china mobile ==> 192.168.3.1
branch office have two WAN lines to connect to headquarter:
1. china telecom ==> 192.168.1.2
2. unicom telecom ==> 192.168.2.2
branch office defaule setup is use 192.168.2.2 to connect to 192.168.2.1 (the same ISP network, the quality is the best)
but when unicom telecom network quality is abnormal, it will change to use 192.168.1.2 to connect to 192.168.2.1 (different ISP network), and the connection quality will not good.
Logged
bartjsmit
Hero Member
Posts: 2014
Karma: 194
Re: openvpn client service auto restart method? (for site to site)
«
Reply #1 on:
January 15, 2021, 08:10:33 am »
There is a setting in OpenVPN that attempts to restore connections after network interruptions. VPN, OpenVPN, Servers, Advanced and add a line with:
persist-tun
Note that you may have to add this to the config files manually in future versions of OPNsense.
Bart...
Logged
chienchou.pan
Newbie
Posts: 19
Karma: 2
Re: openvpn client service auto restart method? (for site to site)
«
Reply #2 on:
January 29, 2021, 04:05:09 am »
I think this setting is not helpful to sovle my issus. Because when the primary WAN disconect to change to backup line, the openvpn connection is look like good always, but it will not have good quality between different ISP(loss packages).Use the setting "persist-tun" will not restore original connection(the same ISP connection).
Logged
Maarten
Jr. Member
Posts: 67
Karma: 6
Re: openvpn client service auto restart method? (for site to site)
«
Reply #3 on:
December 15, 2022, 12:05:54 pm »
Is there a solution for this problem yet? I have the same issue, all I can find is are solutions that involve manually changing config files, which are overridden by a firmware update. This is not practical if you have a dozen of routers with regular firmware updates.
Best regards,
Maarten
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
openvpn client service auto restart method? (for site to site)