Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
Greetings,
it is a month I am trying to find a solution to this problem:
Issue:
- I setup my rpi 3b as a gateway for my LAN.
- rpi is my openvpn router and is a openvpn Client to <VPN_service_name> service.
- I can connect and choose different servers by changing the autostart in /etc/default/openvpn (I have several .conf files I can choose from)
- I obviously restart vpn services:
sudo systemctl daemon-reload
sudo systemctl stop openvpn
sudo systemctl restart openvpn@<server_name>.service
- All work fine!
- Randomly, the connection is dropped and restarted!
Moreover:
if I have more than one server.conf in the folder, it will sort of rotate among the server.conf config files.
HOWEVER, the AUTOSTART in the /etc/default/openvpn file is set with 1 single server name: AUTOSTART="server_name"
Extra info: I moved to rpi3 vpn router (client) as I changed router from ddwrt to Mikrotik (that does not support openvpn client connection). On the ddwrt I had a very stable connection; never cut unless I request it.
My conclusion is that some parameters are incorrect in my system.
Ca you help me?
Thanks
it is a month I am trying to find a solution to this problem:
Issue:
- I setup my rpi 3b as a gateway for my LAN.
- rpi is my openvpn router and is a openvpn Client to <VPN_service_name> service.
- I can connect and choose different servers by changing the autostart in /etc/default/openvpn (I have several .conf files I can choose from)
- I obviously restart vpn services:
sudo systemctl daemon-reload
sudo systemctl stop openvpn
sudo systemctl restart openvpn@<server_name>.service
- All work fine!
- Randomly, the connection is dropped and restarted!
Moreover:
if I have more than one server.conf in the folder, it will sort of rotate among the server.conf config files.
HOWEVER, the AUTOSTART in the /etc/default/openvpn file is set with 1 single server name: AUTOSTART="server_name"
Extra info: I moved to rpi3 vpn router (client) as I changed router from ddwrt to Mikrotik (that does not support openvpn client connection). On the ddwrt I had a very stable connection; never cut unless I request it.
My conclusion is that some parameters are incorrect in my system.
Ca you help me?
Thanks
Last edited by bitchange on Mon Jun 15, 2020 7:56 am, edited 1 time in total.
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to PIA VPN service
At least you made PIA clear in the subject ..
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to PIA VPN service
Sounds like is wrong. As I read other post mentioning VPN providers, I figure I help to letyou know what I am doing.
I can fix that (If I can edit it).
Apologize if that was wrong!
I can fix that (If I can edit it).
Apologize if that was wrong!
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to PIA VPN service
PS
fixed.
Beside it, do you have a suggestion to help me fix the issue?
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
thanks. Apreciate your suggestions.
So far I read, non is related to my situation.
nevertheless, thank you for it. Might come handy in the future.
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
while keep trying to solve my issue, I have additional info in case anyone has similar situation or a good suggestion to help me:
sudenly, openvpn is connecting to a US server that was not the /etc/openvpn folder.
In the /etc/openvpn i inly have 2 european .conf files.
Openvpn client managed to find settings for a US server conf file!
This is getting even more tricky!
Can someone point me out folders or configurations files that might have references I overlooked?
Thanks
sudenly, openvpn is connecting to a US server that was not the /etc/openvpn folder.
In the /etc/openvpn i inly have 2 european .conf files.
Openvpn client managed to find settings for a US server conf file!
This is getting even more tricky!
Can someone point me out folders or configurations files that might have references I overlooked?
Thanks
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
Is there an option somewhere in the openvpn files that gives option to rotate every x minutes?
Mind I already set the AUTOSTART=<conf_Name>
Not "all" or not "none"
Mind I already set the AUTOSTART=<conf_Name>
Not "all" or not "none"
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
Then you are leaking your private data to an unknown third party

I use systemd
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
isn't systemctl restarting the system used systemd?TinCanTech wrote: ↑Tue Jun 16, 2020 1:32 amThen you are leaking your private data to an unknown third party![]()
"bitchange comment": Mmmm... checking on .dnsleaktest. it seem I am no leaking. I have a killswitch as well.I use systemd
sudo systemctl stop openvpn
sudo systemctl daemon-reload
sudo systemctl restart openvpn@<server_name>.service
Is it incorrect after any server change?
-
- OpenVpn Newbie
- Posts: 17
- Joined: Sun Apr 12, 2020 8:28 pm
Re: SOLVED Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service
Greetings,
UPDATE
after researching long enough; duckduckgo, google and more.
Discussing with colleagues and trying several options, I realized there is no much I can do to control this situation!
OpenVPN remain my choice of VPN, but the actual debian package on raspberryPi OS seems not to be the correct choice for the Pi!
I am unable to connect to <commecial_VPN _Provider> no matter what I change up to ANY and all suggested instruction on the internet.
I want to thank TinCanTech that was the only one answering me and his valuable suggestions have lead me to my solution.
... for making me understand that there was no much I could do to solve the issue.
If ever I need to comeback to this project, I will create a new post. And if I will be successful, I can help others with a solution to this issue.
The possibility that I have made mistakes during the OV on pi is highly possible.
No need to come back to me on it...
I recon I was not able to manage this project .And I guess no one else had this issue as no one could really help me. or direct me to the right tips!
MEAN WHILE
I decided to install OpenWRT on my Raspberry PI and use OpenVPN package on it.
Without surprise, I noticed OpenWRT has a great stability (running now since days). and does not rotate or switch to other exit servers.
Conclusion:
For me (and I repeat, this is in my case and not pretending IS the only solution), installing Openwrt on raspberry Pi and using the OPENVPN package on it, solved my problems.
Till the next time....
SOLVED
UPDATE
after researching long enough; duckduckgo, google and more.
Discussing with colleagues and trying several options, I realized there is no much I can do to control this situation!
OpenVPN remain my choice of VPN, but the actual debian package on raspberryPi OS seems not to be the correct choice for the Pi!
I am unable to connect to <commecial_VPN _Provider> no matter what I change up to ANY and all suggested instruction on the internet.
I want to thank TinCanTech that was the only one answering me and his valuable suggestions have lead me to my solution.
... for making me understand that there was no much I could do to solve the issue.
If ever I need to comeback to this project, I will create a new post. And if I will be successful, I can help others with a solution to this issue.
The possibility that I have made mistakes during the OV on pi is highly possible.
No need to come back to me on it...
I recon I was not able to manage this project .And I guess no one else had this issue as no one could really help me. or direct me to the right tips!
MEAN WHILE
I decided to install OpenWRT on my Raspberry PI and use OpenVPN package on it.
Without surprise, I noticed OpenWRT has a great stability (running now since days). and does not rotate or switch to other exit servers.
Conclusion:
For me (and I repeat, this is in my case and not pretending IS the only solution), installing Openwrt on raspberry Pi and using the OPENVPN package on it, solved my problems.
Till the next time....
SOLVED