Librem tunnel VPN (Windows, Arch, fdroid)


#1

Hi there,

I subscribed to the Librem one bundle. Is there a way to access the VPN on a windows machine or arch linux?
If so, can somebody help me out? Thanks.


Librem Tunnel problem
Manual settings for librem.one services
#2

See here: https://docs.puri.sm/Librem_One/PureOS/VPN_Tunnel.html (For Arch you would have to download the script and run it manually, let me know if you need help. No instructions for WIndows as of now.)


#3

Thanks for the quick reply. I will look into it.

What about using the android app OpenVPN from fdroid? Any instructions on how to set it up?


#4

You can always setup the NetworkManager OpenVPN profile and export it elsewhere.
It’s just a set of keys and any app such as OpenVPN for Android (or Windows) will work with it.


#5

I followed the instructions for the Librem Tunnel for PureOS and it would not install. I have enclosed what I see. I tried installing twice.

pip install ldh-client
Collecting ldh-client
Downloading https://files.pythonhosted.org/packages/86/4b/4fdc4a84d223e87bf362b0addbaad25b425c1841ed5383c1e6642be74354/ldh_client-0.0.1.tar.gz
Collecting PyGObject>=3.32.0 (from ldh-client)
Downloading https://files.pythonhosted.org/packages/c1/36/c31a6ce9411b22a8ac0759c9b5ffda09368d5e0643450bb8ed83c271588c/PyGObject-3.32.1.tar.gz (698kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 706kB 1.3MB/s
Installing build dependencies … done
Collecting click>=6.7 (from ldh-client)
Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 81kB 1.5MB/s
Collecting requests>=2.21.0 (from ldh-client)
Downloading https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl (57kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 61kB 2.1MB/s
Collecting pycairo>=1.11.1 (from PyGObject>=3.32.0->ldh-client)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python2.7/dist-packages (from requests>=2.21.0->ldh-client) (2.6)
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.21.0->ldh-client)
Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 143kB 1.7MB/s
Collecting certifi>=2017.4.17 (from requests>=2.21.0->ldh-client)
Downloading https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl (158kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 163kB 1.3MB/s
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/lib/python2.7/dist-packages (from requests>=2.21.0->ldh-client) (1.24.1)
Building wheels for collected packages: ldh-client, PyGObject
Running setup.py bdist_wheel for ldh-client … done
Stored in directory: /home/XXXXXXXXXXXXX/.cache/pip/wheels/38/12/dc/5fa91d87ad514ca42c3acf57f72f2055205d6bf4537c03b430
Running setup.py bdist_wheel for PyGObject … done
Stored in directory: /home/XXXXXXXXXXXX/.cache/pip/wheels/30/7a/00/cdefec8644e21ce0d5a438f96ce0ba65b51eb648c4e4614d62
Successfully built ldh-client PyGObject
Installing collected packages: pycairo, PyGObject, click, chardet, certifi, requests, ldh-client
The script chardetect is installed in β€˜/home/XXXXXXXXXXXX/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script liberty is installed in β€˜/home/XXXXXXXXXXXX/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed PyGObject-3.32.1 certifi-2019.3.9 chardet-3.0.4 click-7.0 ldh-client-0.0.1 pycairo-1.18.1 requests-2.21.0
XXXXXXXXXXX@XXXXXXXXXXXXX:~$ liberty tunnel-setup
liberty: command not found

Thanks.


#6

The script liberty is installed in β€˜/home/XXXXXXXXXXXX/.local/bin’ which is not on PATH.

So you need to run it from from the correct location: ./home/XXXXXXXXXXXX/.local/bin/liberty
or add it to PATH:
export PATH=$PATH:/home/XXXXXXXXXXXX/.local/bin


#7

how will I go about adding it into the path? I thought I the tunnel setup files would have done that for me.


#8

This command in the terminal:
export PATH=$PATH:/home/XXXXXXXXXXXX/.local/bin

Considering it’s all still beta software, maybe if this solution works for you open a ticket to them.


#9

I relooked and saw your export comand. I ran the command and this is what it brought me back.

export PATH=$PATH:./home/XXXXXXXXXXX/.local/bin
XXXXXXXXX@XXXXXXXXXXXp:/$ liberty tunnel-setup
Traceback (most recent call last):
File β€œ./home/XXXXXXXXXXX/.local/bin/liberty”, line 6, in
from scripts.liberty import cli
File β€œ/home/XXXXXXXXXXXX/.local/lib/python2.7/site-packages/scripts/liberty.py”, line 2, in
from scripts.nm_tunnel_setup import nm_tunnel_setup
File β€œ/home/XXXXXXXXXX/.local/lib/python2.7/site-packages/scripts/nm_tunnel_setup.py”, line 16, in
from json.decoder import JSONDecodeError
ImportError: cannot import name JSONDecodeError


#10

So this is already a different issue, at least your script now runs :slight_smile:
For the missing python package, install the following:
apt install python-simplejson - as sudo obviously


#11

I ran the command and ran the set up file for the librem tunnel. Here is what It brough back.

liberty tunnel-setup
Traceback (most recent call last):
File β€œ./home/XXXXXXXXXXXXXXX/.local/bin/liberty”, line 6, in
from scripts.liberty import cli
File β€œ/home/XXXXXXXXXXXXXX/.local/lib/python2.7/site-packages/scripts/liberty.py”, line 2, in
from scripts.nm_tunnel_setup import nm_tunnel_setup
File β€œ/home/XXXXXXXXX/.local/lib/python2.7/site-packages/scripts/nm_tunnel_setup.py”, line 16, in
from json.decoder import JSONDecodeError
ImportError: cannot import name JSONDecodeError


#12

I went ahead and reran some of the commands.

pipx install ldh-client --force
Installing to existing directory β€˜/XXXXXXXXXXXX/.local/pipx/venvs/ldh-client’
:warning:️ File exists at /home/XXXXXXXXXXXXXX/.local/bin/liberty and points to /home/XXXXXXXXXXXXXX/.local/bin/liberty. Not creating.
installed package ldh-client 0.0.1, Python 3.7.3rc1
- liberty (symlink not installed)
done! :sparkles: :star2: :sparkles:


#13

Hi all,

Just some to summarize some points of this thread:

  • The recommended install method for Librem Tunnel in Desktops at this moment is with pipx, not with pip. Soon there will be a .deb package and it will be possible to install directly from pureOS with apt.

The install instructions in https://docs.puri.sm/Librem_One/PureOS/VPN_Tunnel.html

sudo apt update
sudo apt install pipx python3-venv python3-dev libcairo2-dev libgirepository1.0-dev
pipx install ldh-client

These instructions are valid for most Debian based distros. Other distros require adjustments, like stated above, for example dependencies might have different names, and the install command is surely different.

If during the install procedure you have the following error:

Installing to existing directory β€˜/XXXXXXXXXXXX/.local/pipx/venvs/ldh-client’
File already exists

It’s usually because you tried to install it before with and for some reason failed . You can delete the folder ldh-client at /home/USERNAME/.local/pipx/venvs/ldh-client and try again.

You can also export your OpenVPN profile file to other platforms and apps following these instructions authored by @mladen in the support chat room.

1 - Boot PureOS live (or your debian based distro) on your computer
2 - Follow the instructions: https://docs.puri.sm/Librem_One/PureOS/VPN_Tunnel.html
3 - Export the VPN config, save to USB drive, copy the certificate as well (should be in ca β€œ/home/USERNAME/.cert/nm-openvpn/somerandomcharacters-ca.pem”)
4 - Import those into your openVPN app X platform

And we are working to bring the Librem One apps to F-Droid


#14

Thank you so much. I did exactly what you said and it worked.

I really appreciate the help.


#15

@steven.ellsworth40 Glad to hear it. :smile:


#16

i am not in a rush to potentially break my now connected VPN…lol., but are we able to connect to other servers in various cities?

If so, anyone know how?


#17

I am running Manjaro and got ldh_client installed and when I run β€œliberty tunnel-setup” I get β€œtunnel not active” message. Can I get an OpenVPN config script or some more info on non-PureOS set up?

@miaden you mention a downloading a script for Arch? Do you have a link?

Thanks!


#18

@Russ I think you wanted to write: @mladen

The script can be accessed from here, but it requires some adjustments to run in Arch Linux


#19

@Russ The needed change is at this line: https://source.puri.sm/liberty/ldh_client/blob/master/scripts/nm_tunnel_setup.py#L67, remove x86_64-linux-gnu/.

Dependencies you need: python-gobject and python-requests.


#20

I also needed to install the gobject-introspection package to build in manjaro