subgraph / subgraph-os-issues

Subgraph OS issues repository
73 stars 10 forks source link

Documented example for oz OpenVPN #276

Open kibal opened 6 years ago

kibal commented 6 years ago

Install the basic utilities for connecting to an OpenVPN server and for using Transmission, a BitTorrent client:

sudo apt-get install -y transmission
sudo apt-get install -y openvpn

In this example we use Private Internet Access and download their configuration bundle:

cd ~/Downloads/
wget -c https://www.privateinternetaccess.com/openvpn/openvpn-strong.zip

Unzip the PIA configs:

cd ~/Downloads/
mkdir pia-configs
cd pia-configs
unzip ../openvpn-strong.zip

Create a place to put these configuration files:

sudo mkdir /var/lib/oz/openvpn/PIA/
sudo cp *.ovpn /var/lib/oz/openvpn/PIA/
sudo cp ca.rsa.*.crt /var/lib/oz/openvpn/
sudo cp crl.rsa.*.pem /var/lib/oz/openvpn/
sudo chown -R root:root /var/lib/oz/openvpn/

Create a VPN specific name resolution configuration file:

cat << 'EOF' > pia-resolv.conf
nameserver 209.222.18.222
nameserver 209.222.18.218
EOF
sudo cp pia-resolv.conf /var/lib/oz/openvpn/PIA/

Configure credentials issued to you by PIA by replacing the following USERNAME and PASSWORD with your credentials:

cat << 'EOF' > auth.txt
USERNAME
PASSWORD
EOF
sudo cp auth.txt /var/lib/oz/openvpn/PIA/

Download an oz OpenVPN profile for transmission:

wget -c https://raw.githubusercontent.com/subgraph/contrib-oz-profiles/master/transmission-gtk.json
wget -c https://raw.githubusercontent.com/subgraph/contrib-oz-profiles/master/transmission-whitelist.seccomp

Rewrite the oz profile to use PIA's Norway OpenVPN server:

sed -i 's/VPN\/auth.txt/PIA\/auth.txt/g' transmission-gtk.json
sed -i 's/VPN\/VPN.ovpn/PIA\/Norway.ovpn/g' transmission-gtk.json
sed -i 's/VPN\/vpn.resolv.conf/PIA\/pia-resolv.conf/g' transmission-gtk.json
sed -i 's/bridge":"transmission-vpn/bridge":"torrent-vpn/g' transmission-gtk.json

Configure and install the oz OpenVPN profile for transmission:

sudo cp transmission-gtk.json transmission-whitelist.seccomp /var/lib/oz/cells.d/ 
sudo chown root:root /var/lib/oz/cells.d/transmission-*
sudo chown -R root:root /var/lib/oz/openvpn/
sudo systemctl reload oz-daemon
sudo oz-setup install transmission-gtk

Open Transmission and download your favorite GNU/Linux distribution with Bittorrent:

transmission-gtk

Routing OpenVPN over Tor should also be documented.

unsigned-nerd commented 6 years ago

How do you navigate their website to find the link:

https://www.privateinternetaccess.com/openvpn/openvpn-strong.zip

?

Is it from their support page:

https://helpdesk.privateinternetaccess.com/hc/en-us/articles/218984968-What-is-the-difference-between-the-OpenVPN-config-files-on-your-website-

?

unsigned-nerd commented 6 years ago

I have found a related link so I think it would be helpful to place it here too.

https://subgraph.com/sgos/documentation/openvpn-chromium/