Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Raspberry pi openvpn client randomly dis/reconnect to <commercial VPN> VPN service

Post by bitchange » Sun Jun 14, 2020 10:06 pm

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
Last edited by bitchange on Mon Jun 15, 2020 7:56 am, edited 1 time in total.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Raspberry pi openvpn client randomly dis/reconnect to PIA VPN service

Post by TinCanTech » Mon Jun 15, 2020 12:22 am

At least you made PIA clear in the subject ..

bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Re: Raspberry pi openvpn client randomly dis/reconnect to PIA VPN service

Post by bitchange » Mon Jun 15, 2020 7:55 am

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!

bitchange
OpenVpn Newbie
Posts: 17
Joined: Sun Apr 12, 2020 8:28 pm

Re: Raspberry pi openvpn client randomly dis/reconnect to PIA VPN service

Post by bitchange » Mon Jun 15, 2020 7:57 am

TinCanTech wrote:
Mon Jun 15, 2020 12:22 am
At least you made PIA clear in the subject ..
PS
fixed.
Beside it, do you have a suggestion to help me fix the issue?

TinCanTech
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

Post by TinCanTech » Mon Jun 15, 2020 10:55 am


bitchange
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

Post by bitchange » Mon Jun 15, 2020 10:14 pm

TinCanTech wrote:
Mon Jun 15, 2020 10:55 am
viewtopic.php?f=30&t=20733
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.

bitchange
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

Post by bitchange » Mon Jun 15, 2020 10:18 pm

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

bitchange
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

Post by bitchange » Mon Jun 15, 2020 10:43 pm

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"

TinCanTech
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

Post by TinCanTech » Tue Jun 16, 2020 1:32 am

bitchange wrote:
Mon Jun 15, 2020 10:18 pm
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!
Then you are leaking your private data to an unknown third party :twisted:
bitchange wrote:
Mon Jun 15, 2020 10:43 pm
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"
I use systemd

bitchange
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

Post by bitchange » Tue Jun 16, 2020 6:54 am

TinCanTech wrote:
Tue Jun 16, 2020 1:32 am
bitchange wrote:
Mon Jun 15, 2020 10:18 pm
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!
Then you are leaking your private data to an unknown third party :twisted:
"bitchange comment": Mmmm... checking on .dnsleaktest. it seem I am no leaking. I have a killswitch as well.
bitchange wrote:
Mon Jun 15, 2020 10:43 pm
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"
I use systemd
isn't systemctl restarting the system used systemd?
sudo systemctl stop openvpn
sudo systemctl daemon-reload
sudo systemctl restart openvpn@<server_name>.service

Is it incorrect after any server change?

bitchange
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

Post by bitchange » Sat Jun 20, 2020 8:50 am

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

Post Reply