LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Anyone running Protonvpn under networkmanager? (https://www.linuxquestions.org/questions/slackware-14/anyone-running-protonvpn-under-networkmanager-4175735413/)

business_kid 03-28-2024 11:54 AM

Anyone running Protonvpn under networkmanager?
 
I'm on current, and trying to run Protonvpn. I weaned myself off network setup via init scripts, because the vpn would drop out sporadically. Restarting the vpn would fix it. But it was an irritation.

So now I have Networkmanager, grabbed the deb2tgz script, ran the slackbuild, The pkg only contains a file in /etc/apt/sources.list.d/, one in /usr/share/doc/ & /usr/share/keyrings/.

Should I go back to the init scripts? Did I grab the wrong file?

drumz 03-28-2024 12:42 PM

Not with the Proton VPN client, but yes you can use NetworkManager if you download the OpenVPN configuration file from your Proton account and then import that file into NetworkManager. I did this on my last computer. The downside is every different Proton VPN server has its own configuration file. That is, you don't get the auto-selection feature that the ProtonVPN client has.

Which Proton VPN client are you using? The one on SlackBuilds.org (https://slackbuilds.org/repository/1...=protonvpn-cli) uses the old community version. It appears to me the official client requires systemd.

marav 03-28-2024 12:53 PM

Quote:

Originally Posted by business_kid (Post 6492545)
I'm on current, and trying to run Protonvpn. I weaned myself off network setup via init scripts, because the vpn would drop out sporadically. Restarting the vpn would fix it. But it was an irritation.

So now I have Networkmanager, grabbed the deb2tgz script, ran the slackbuild, The pkg only contains a file in /etc/apt/sources.list.d/, one in /usr/share/doc/ & /usr/share/keyrings/.

Should I go back to the init scripts? Did I grab the wrong file?

Yep
I have a wireguard conf that works fine

But the downloaded file cannot be included as is, I have to complete a new configuration
in NM by hands

business_kid 03-28-2024 02:37 PM

Thanks for the reply

Well, it transpires the maintainer of the Protonvpn Slackbuild has an @protonvpn.com email, so I've sent him a query. I'll post what I get back. The more I think about importing things into networkmanager, the more unwell I feel. Init scripts are nice.

I'll post the gist of what comes back (if anything). I have a backup of the old system which I can't restore, but I can pinch 'known good' stuff from. I've been doing that. /etc/rc.d/ stuff is all known good.

drumz 03-28-2024 02:54 PM

Quote:

Originally Posted by business_kid (Post 6492578)
Well, it transpires the maintainer of the Protonvpn Slackbuild has an @protonvpn.com email.

It's actually @protonmail.com.

business_kid 03-28-2024 02:54 PM

Quote:

Originally Posted by marav (Post 6492559)
Yep
I have a wireguard conf that works fine

But the downloaded file cannot be included as is, I have to complete a new configuration
in NM by hands

Just to explain, my previous post was a reply to @drumz

But thanks for that, you have made up my mind for me. RC scripts it is for me. I had an alias for the community app where I could simply put 'vp <country code> and I would be logged on to the server of choice, It was useful for getting around outages, or deceiving geo-ip :D.

EDIT: @drumz: Thanks for spotting that. The email actually was sent to @protonmail.com.

ceed 03-28-2024 05:39 PM

I use a couple of wireguard configs under NM which work fine. Downside is I lose access to full list of servers.

The community build works as well, however something has recently broken the status switch (protonvpn s) on my system. I don't know whether it is the recent upgrade or some other python module or other. Does anyone else experience this breakage, and if so any insight would be appreciated.

Aeterna 03-28-2024 05:52 PM

wireguard will work with NM and should not drop connections
Quote:

I use a couple of wireguard configs under NM which work fine. Downside is I lose access to full list of servers.
I don't, I see OpenVPN and wireguard in NM

business_kid 03-29-2024 05:27 AM

Feel free to carry on chatting about NM, but I have the linux-community-cli back running, and NM is not being used any more. Protonvpn issues copious error messages but version 2.2.12 works, whereas 2.2.11 does not. I have an issue raised on github, and we'll see what comes of it.

ceed 03-29-2024 07:49 AM

@business_kid interesting I just get python spaghetti error code when I use the status switch. Will be interesting to see if anything happens there.

drumz 03-29-2024 08:45 AM

Quote:

Originally Posted by business_kid (Post 6492664)
Feel free to carry on chatting about NM, but I have the linux-community-cli back running, and NM is not being used any more. Protonvpn issues copious error messages but version 2.2.12 works, whereas 2.2.11 does not. I have an issue raised on github, and we'll see what comes of it.

Did you do anything special? I tried setting up linux-community-cli on my new computer (Slackware 15.0) and it doesn't work. (I'm on the free VPN plan, and tried both UDP and TCP connection types.)

Code:

# protonvpn init
...
Writing configuration to disk...
[!] There was an error connecting to the ProtonVPN API.
[!] Please make sure your connection is working properly!

and in the log:
Code:

2024-03-28 14:55:09,908 — protonvpn-cli — DEBUG — cli:89 — ###########################
2024-03-28 14:55:09,908 — protonvpn-cli — DEBUG — cli:90 — ### NEW PROCESS STARTED ###
2024-03-28 14:55:09,908 — protonvpn-cli — DEBUG — cli:91 — ###########################
2024-03-28 14:55:09,908 — protonvpn-cli — DEBUG — cli:92 — ['/usr/bin/protonvpn', 'init']
2024-03-28 14:55:09,908 — protonvpn-cli — DEBUG — cli:93 — USER: root
2024-03-28 14:55:09,908 — protonvpn-cli — DEBUG — cli:94 — CONFIG_DIR: /root/.pvpn-cli
2024-03-28 14:55:09,910 — protonvpn-cli — DEBUG — cli:97 — Arguments
{'--cc': None, '--fastest': False, '--help': False, '--p2p': False, '--random': False, '--sc': False, '--tor': False, '--version': False, '-p': None, '<servername>': None, 'c': False, 'configure': False, 'connect': False, 'd': False, 'disconnect': False, 'examples': False, 'init': True, 'r': False, 'reconnect': False, 'refresh': False, 's': False, 'status': False}
2024-03-28 14:55:30,639 — protonvpn-cli — DEBUG — init_config_file:180 — pvpn-cli.cfg initialized
2024-03-28 14:55:30,651 — protonvpn-cli — DEBUG — call_api:38 — Initiating API Call: https://api.protonvpn.ch/vpn/logicals
2024-03-28 14:55:30,731 — protonvpn-cli — DEBUG — call_api:53 — Error connecting to ProtonVPN API


business_kid 03-29-2024 09:38 AM

In the download linux-coomunity-cli directory, there is a file called requirements.txt. I ran (as root)
Code:

pip3 install -r requirements.txt
which gets me the required python3 modules. My /usr/bin/python symlink points at python3.9.

I also found that it only accepted my encrypted password, not what I had entered. I got that from the protonvpn site, IIRC. Protonvpn also only works as root, and doesn't work using sudo. Perhaps that's a config error. I get piles of crap from version 2.2.12, but it works, and I have an open issue about it.

Lastly, if you're on the free plan, and you error out after a check of that website, it's possible that you're connecting to the wrong server. I think there's only 3 countries offering free servers, of which I can remember only 2: NL & JP. So
Code:

protonvpn connect --cc nl
should get you online. If it works add it just after getting online in your init script startup and add 'protonvpn d' as the first line in your network stop routine.

EDIT: UDP works fine - no need to change it. It's smarter.


All times are GMT -5. The time now is 02:18 PM.