Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: ExpressVPN - SystemD to OpenRC too much trouble. Here's how to use PIA instead (Read 1863 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

ExpressVPN - SystemD to OpenRC too much trouble. Here's how to use PIA instead

[edit:] I found ExpressVPN needs systemd, & getting around that is a bit more trouble than its worth. So I ended up with Private Internet Access (PIA). No logs, & a good price. They work with non-mainstream distro's, & I eventually dug up a post in their forum that showed me how to very easily make PIA work on Artix (or any other Linux for that matter). It is in a post down the page a bit. Cheers /


Hi guys, I've been reading for many hours, to find that I just don't have the requisite knowledge to get through this one on my own (how do I find out what the files PID is? though I'm in much more trouble than just that...).

I've just let AirVPN expire & have taken on a subscription with ExpressVPN (they have servers in my own hemisphere & country!).

Problem is, their Linux support is for 4 or 5 SystemD distros. They do use OpenVPN, & I'm confident that their service will run on OpenRC. I just can't work out how to write a file to do it.

This is the service file provided in my ExpressVPN install from the AUR (to get it to install from the AUR you have to go through the Linux PGP Download & Verification found here):

Code: [Select]
[Unit]
Description=ExpressVPN Daemon
After=network-online.target

[Service]
User=root
EnvironmentFile=/etc/default/expressvpn
Environment=PATH=/bin:/sbin:/usr/bin:/usr/sbin
ExecStart=/usr/sbin/expressvpnd --client-version 1.3.2 --client-build 2386
KillMode=process
KillSignal=SIGINT
Restart=on-failure
RestartSe=5

[Install]
WantedBy=multi-user.target

I can provide copies of any other files that may be required.

Re: Bringing ExpressVPN in from SystemD to OpenRC, I need some help with this one?

Reply #1
I've been running openvpn with openvpn-openrc for years; where exactly do you encounter problems?

Re: Bringing ExpressVPN in from SystemD to OpenRC, I need some help with this one?

Reply #2
Hi nouse,

I downloaded & installed their software via the AUR, when I run it I get the following, due to their software being setup to use systemd (I spent hours reading stuff - Gentoo & elsewhere, in an attempt to learn how to write a file that would use the info' provided for systemd  - some of it posted above - to start the file in OpenRC - I failed. I need to know a great deal more on the subject.):

Code: [Select]
 [[email protected] ~]$ expressvpn activate
Cannot connect to expressvpnd daemon.

It seems the expressvpn daemon is not running. Please run "sudo service expressvpn restart" to start it.

If the problem persists, please contact us.

I have sent them an email re. this problem, I doubt that I'll get anyone over there to write the required script so that I can run their software as a daemon on OpenRC.

Re: Bringing ExpressVPN in from SystemD to OpenRC, I need some help with this one?

Reply #3
So what's the problem here? OpenRC scripts are just bash, go write one.
You have the start command (/usr/sbin/expressvpnd --client-version 1.3.2 --client-build 2386), read the openrc docs and/or copy an existing script in /etc/init.d, use your command in the start() section.
You'll probably want something like  'need net-online' in the depend section too, I presume you will want it to start after the network is up.

how do I find out what the files PID is?
There are many ways (pidof and start-stop-daemon spring to mind), but why do you need it anyway?

 

Re: Bringing ExpressVPN in from SystemD to OpenRC, I need some help with this one?

Reply #4
The ExpressVPN client software must be running as a service before the user can activate their account. I was trying to work out how to create an initscript (or whatever the file is called) that would allow their systemd client software to start using openrc. In my fumbling about, I was trying to do something along the lines of convert the quoted systemd service file in the OP into an openrc equivalent. After a while, I realised that I was wasting my time.

Anyway, I'll get a refund on ExpressVPN, as they won't waste their time on me. I've now got an account with Private Internet Access (PIA), & I've again had to hunt high & low to get the information I needed to be able to get their system running, as they are set up for the Ubuntu & the other major players. The good news is that they keep no logs, & they have been tested in court on the matter. & they are pretty cheap US$39.95 / year.

For anyone who wants to know, here is how you set it up on something OTHER than Ubuntu/Fedora/Red Hat/Debian/Mint (stuck pacman in there & deleted other stuff):

Code: [Select]
This set-up should work on any version of Linux, provided 
you replace the package manager commands (apt-get, etc.)
with ones appropriate for your distribution (such as yum/dnf):

sudo pacman -S openvpn
cd /etc/openvpn
sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
sudo unzip openvpn.zip
ls -l
sudo openvpn 'config-filename-goes-here.ovpn'

    (e.g. sudo openvpn 'US East.ovpn')

Beyond that you can fine tune the supplied .ovpn files, which I've done a little of. Though I must say that finding the information, you require looks to come mostly from the forum & not the staff, at least with regard to tuning your connection.

Anyway I'm happy enough. I might change the name of this thread to help someone find this PIA stuff.

Cheers