LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Instructions for installing/setup of protonVPN on Slackware 14.2 - Multilib (https://www.linuxquestions.org/questions/slackware-installation-40/instructions-for-installing-setup-of-protonvpn-on-slackware-14-2-multilib-4175635427/)

endless-rain 08-01-2018 06:40 AM

Instructions for installing/setup of protonVPN on Slackware 14.2 - Multilib
 
Hey slackers & slackettes, I am in need of some sort of Direction/Instructions/Steps for installing/setup of protonVPN on Slackware 14.2 - Multilib.

I have googled a fair bit and while I have found protonVPN uses openVPN etc, and i have found some fairly detailed instructions for installing this VPN on Linux, here:

https://protonvpn.com/support/linux-vpn-tool/

I am a little scared of breaking something if i try to install this on my fresh new slackware install, (which i spent a little bit of time and a lot of love setting up) also i paid a fair bit of money for this program and would like to be able to enjoy it.

Now this is probably, the 30th time i have installed slackware, So i am the N00best N00b that ever N00bed and i still need to follow VERY precise instructions, but i am getting better with practice, i can handle slackpkg and SlackBuilds, and i'm prtetty good at copying an pasting commands into terminal, but i get a bit headachey when i start digging into man pages and what not :D

Could anybody help me please? :))

I would be eternally greatful as PRIVACY is very important to me as I am quite active in the uh, ahem, torrenting community.

Also, I think it might be nice if somebody awesome, did a writeup on how to make slack as anonymous as possible on the web. EG: for someone who uploads and shares a lot of files.

rtmistler 08-01-2018 07:51 AM

Moved: This thread is more suitable in Slackware Installation and has been moved accordingly to help your thread/question get the exposure it deserves.

endless-rain 08-01-2018 08:03 AM

Thankyou.

abga 08-01-2018 09:52 AM

The setup and usage looks pretty simple, script based. Actually there are 2 scripts:
https://raw.githubusercontent.com/Pr...otonvpn-cli.sh
and another one that protonvpn-cli.sh downloads and puts in /etc/openvpn/
https://raw.githubusercontent.com/Pr...resolv-conf.sh
The only dependency you'll need that doesn't come with Slackware as a standard installation package is:
http://slackbuilds.org/repository/14...rk/openresolv/

Follow the instructions from:
https://protonvpn.com/support/linux-vpn-tool/
- skip to step 3 as you don't need the dependencies described in the previous steps
- don't use sudo but run all command as root instead
- backup your actual /etc/resolv.conf before you mess up with it
- and that's about it

Make sure that all your Internet traffic goes only through the VPN, configure the listening services on the tun interface/VPN IP and consider that protonVPN will always know who you are, that's your real IP.
https://www.netfilter.org/documentation/index.html

Good Luck!

P.S. After you got your VPN working you might consider seeding the Slackware ISO images.

endless-rain 08-01-2018 05:44 PM

does not work.

endless-rain 08-01-2018 08:52 PM

doesn't work

endless-rain 08-01-2018 11:18 PM

Actually, this is unsolved as it only works for ROOT. [VERY INSECURE]
What happens if i want to go on IRC ?

I don't want to be logged into my root account.



I have been trying same steps with my regular user account via sudo.

THIS DOES not WORK.

I thought this may be a permission issue, as when i was installing openvpn is said i had to add a group for open VPN.
which install fine under root, but will NOT work using sudo commands.

endless-rain 08-01-2018 11:46 PM

Nup its fucked now, broke everything trying to fix it, thanks alot.

for providing me instrustions that ONLY work for ROOT

of course root works, IT DOES EVBERYTHING>

you swhow me onw person who want to run their whole system as root the whole time.

STUPID

endless-rain 08-02-2018 02:05 AM

I have fresh install again now.
how do i install this with sudo. ?????

abga 08-02-2018 02:18 AM

Quote:

Originally Posted by endless-rain (Post 5886751)
Nup its fucked now, broke everything trying to fix it, thanks alot.

for providing me instrustions that ONLY work for ROOT

of course root works, IT DOES EVBERYTHING>

you swhow me onw person who want to run their whole system as root the whole time.

STUPID

I advised about following the instructions from protonVPN:
https://protonvpn.com/support/linux-vpn-tool/
by skipping a few unneeded steps, adding a necessary dependency and running the commands as root, which would have had the same effect if executed with sudo.
You're right by considering running openvpn as root insecure and it's unfortunately a design limitation of the protonVPN client (scripts), therefore send your thanks to them.
If you like, you can complete the path and add your user to the sudoers and run the protonVPN scripts with sudo:
Code:

# add /usr/sbin and /sbin to your path
PATH=$PATH:/usr/sbin:/sbin
# edit the file /etc/sudoers by executing
/usr/sbin/visudo
# and add your username, save and exit> :wq!
your_username ALL=(ALL) NOPASSWD: ALL

There is a possibility to use the protonVPN (openvpn) as a user, will still need root (sudo) privileges for some steps, but that will imply some extra work in modifying the protonVPN scripts (maybe easier to ditch them and create your own instead), some skills and the ability for dialogue on your side.

STUPID solution indeed!

endless-rain 08-02-2018 02:32 AM

Hey, thankyou!

Look first off, Apologies, In no way did I mean YOU were stupid, Just the instructions, I am a little bi-polar, so excuse me if i sounded rude.

Anyhow, I am getting old hat at slackware installs now. I can install it ALMOST as fast as i can destroy it. xD



Ok, maybe I will write them some angry emails and ditch this VPN, but i'm at a loss as to who to trust or what will configure easily slackware.

I'm not sure what to do anymore, Do you have any recommendations ?

Oh, I just remembered i have a seedbox and it has the ability to run a VPN, I have read a few people route their internet through a seedbox, I know how to install software on it, because you just click it and it installs, but i'm not so sure about routing my internet connection through my seedbo, i think that might be too dificult for me, I will look into it and See what happens.

Thankyou so much, for all your time and effort :)

abga 08-02-2018 04:18 AM

No issues about your rant, just direct it where it belongs ;)
The main problem here is that openvpn is launched as root and that is something the folks at protonVPN should consider changing. And I'm in favor of a transparent script solution like this one instead of a binary executable that I cannot verify/trust. Finally, protonVPN is not that bad of a choice after all:
https://en.wikipedia.org/wiki/ProtonVPN

Using an external system to run protonVPN and then directing your traffic through it is also pointless because that system is also running openvpn as root, once hacked, you're the next potential victim and this alternative is a little more complicated, it'll imply mastering firewalling (netfilter) and advanced routing.
ProtonVPN have a guide on how to configure their VPN on DD-WRT, but these routers are pretty lame when it comes to encryption performance (vpn), outputting on average 20-30Mbit/s and openvpn is still unable to make use of multi-core CPUs.
https://protonvpn.com/support/vpn-router-ddwrt/

Without having the necessary credentials to actually start a protonVPN connection myself, I'm limited to only studying the protonvpn-cli.sh script and simulate what it'll actually do after downloading all the stuff from protonVPN and initiating the vpn connection.
I've noticed the launch of openvpn at line 480 and you might want to consider adding a dummy vpn user and change the way openvpn is launched by adding the --user --group directives. Not 100% it'll work but it's maybe worth a try.
As the protonvpn-cli.sh script will copy itself at step 5, this modification should be made immediately after step 3:
https://protonvpn.com/support/linux-vpn-tool/
First add the dummy vpn user as root:
Code:

groupadd protovpn
adduser protovpn

Login name for new user: protovpn

User ID ('UID') [ defaults to next available ]:

Initial group [ users ]: protovpn

Home directory [ /home/protovpn ] /dev/null

Shell [ /bin/bash ] /bin/false
- Warning: /bin/false is not in /etc/shells (potential problem using FTP)
  Do you wish to change the shell ? (Y/n)  n
# after this step press Enter until you get the prompt (set no password)

Then go on and modify protonvpn-cli.sh at line 480:
Code:

#from
  | openvpn --daemon --config "/dev/stdin" --auth-user-pass "$(get_protonvpn_cli_home)/protonvpn_openvpn_credentials" --auth-retry nointeract --verb 4 --log "$connection_logs"
#to
  | openvpn --daemon --user protovpn --group protovpn --config "/dev/stdin" --auth-user-pass "$(get_protonvpn_cli_home)/protonvpn_openvpn_credentials" --auth-retry nointeract --verb 4 --log "$connection_logs"

Note that the protonvpn-cli.sh has an update routine and if that is called you'll loose your modifications. It's better to ask the folks at protonVPN to modify their script upstream, add the creation of a dummy unprivileged user and launch openvpn as this user. Point them to this good lecture:
https://community.openvpn.net/openvp...privilegedUser

Good Luck!

abga 08-02-2018 05:09 AM

I believe that the script changes I suggested in my previous post, the ones related to the launch of openvpn as an unprivileged user, will not work properly. That's because I couldn't find a routine for handling the routing in that script, nor in the:
https://raw.githubusercontent.com/Pr...resolv-conf.sh

Handling the routing by openvpn itself is why it's launched as root and this is an openvpn limitation, mentioned here:
https://www.linuxquestions.org/quest...1/#post5832453
- towards the end of the post - section that starts with "The Complicated Way "

Still, protonVPN should start openvpn as an unprivileged user and handle the routing in the script instead, which is launched with root privileges.

endless-rain 08-02-2018 05:40 AM

wow, this is turning out to be some sticky mess, haha, thankyou for your patience and clear explanations.
I'm going to email the people at protonVPN and see what they can do about it.

abga 08-02-2018 06:04 AM

Not a sticky mess, but an opportunity for you to learn and become independent, master your VPNs and networking ;)
If protonVPN is unable to help with modifying the script, at least ask them to help you create your openvpn.conf file and then run your own openvpn client, following what I or bassmadrigal suggested here:
https://www.linuxquestions.org/quest...es-4175625731/
Or, google after some complete guides if you like, plenty of good info out there.


All times are GMT -5. The time now is 07:39 AM.