All Projects → pschmitt → Pia Tools

pschmitt / Pia Tools

Licence: gpl-3.0
Shell script to automate privateinternetaccess port forwarding and starting/stopping transmission when connected/disconnected and other stuff

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Pia Tools

Docker Transmission Openvpn
Docker container running Transmission torrent client with WebUI over an OpenVPN tunnel
Stars: ✭ 2,748 (+2013.85%)
Mutual labels:  torrent, openvpn, transmission
Vycontrol
vyos frontend
Stars: ✭ 92 (-29.23%)
Mutual labels:  vpn, openvpn
Desktop Legacy
VPN.ht Desktop Application for Windows and Mac OS X built on top of Electron
Stars: ✭ 83 (-36.15%)
Mutual labels:  vpn, openvpn
Betanin
beets based mitm of your torrent client and music player
Stars: ✭ 101 (-22.31%)
Mutual labels:  torrent, transmission
React Transmission
React Transmission is an ongoing reimplementation of Transmission web interface.
Stars: ✭ 126 (-3.08%)
Mutual labels:  torrent, transmission
Torrt
Automates torrent updates for you
Stars: ✭ 73 (-43.85%)
Mutual labels:  torrent, transmission
Android
VPN.ht Android Application. Based on ics-openvpn.
Stars: ✭ 99 (-23.85%)
Mutual labels:  vpn, openvpn
Teletor
Telegram Torrents Bot
Stars: ✭ 54 (-58.46%)
Mutual labels:  torrent, transmission
Vpn2018
One Click VPN for Android. 一键连接VPN Android 专用.
Stars: ✭ 108 (-16.92%)
Mutual labels:  vpn, openvpn
Transmission Blocklist
torrent blocklist base on : https://gist.github.com/shmup/29566c5268569069c256
Stars: ✭ 109 (-16.15%)
Mutual labels:  torrent, transmission
Cake Vpn
Android VPN app based on OpenVPN library.
Stars: ✭ 109 (-16.15%)
Mutual labels:  vpn, openvpn
Pi Hole Pivpn On Google Compute Engine Free Tier With Full Tunnel And Split Tunnel Openvpn Configs
Run your own privacy-first ad blocking service in the cloud for free on Google Cloud Services.
Stars: ✭ 1,141 (+777.69%)
Mutual labels:  vpn, openvpn
Tunnelblickctl
🔒 Command-line interface for Tunnelblick
Stars: ✭ 64 (-50.77%)
Mutual labels:  vpn, openvpn
Fragments
Moved to GNOME GitLab -> https://gitlab.gnome.org/haecker-felix/Fragments
Stars: ✭ 80 (-38.46%)
Mutual labels:  torrent, transmission
Vpn At Home
1-click, self-hosted deployment of OpenVPN with DNS ad blocking sinkhole
Stars: ✭ 1,106 (+750.77%)
Mutual labels:  vpn, openvpn
Nordpy
A gui application to connect automatically to the recommended NordVPN server
Stars: ✭ 95 (-26.92%)
Mutual labels:  vpn, openvpn
Nordvpn Networkmanager
A CLI tool for automating the importing, securing and usage of NordVPN (and in the future, more) OpenVPN servers through NetworkManager.
Stars: ✭ 111 (-14.62%)
Mutual labels:  vpn, openvpn
Linux Cli
Linux command-line client for ProtonVPN. Written in Python.
Stars: ✭ 1,047 (+705.38%)
Mutual labels:  vpn, openvpn
Softethervpn
Cross-platform multi-protocol VPN software. Pull requests are welcome. The stable version is available at https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.
Stars: ✭ 8,531 (+6462.31%)
Mutual labels:  vpn, openvpn
Azclient
Customizable VPN client, meant to be simple and sleek.
Stars: ✭ 106 (-18.46%)
Mutual labels:  vpn, openvpn

pia-tools

Description

OpenVPN hook for privateinternetaccess.com to automate port forwarding, dynamically add a firewall rule, starting/stopping transmission when connected/disconnected

TODO

  • Ship a ready-to-go OpenVPN wrapper service for systemd
  • Get rid of cURL and rename (and sudo?) dependencies
  • Modularity
  • Automate the post-installation
  • Better error handling

Dependencies

  • curl
  • dnsutils (nslookup)
  • openvpn
  • sed
  • sudo
  • systemd (pseudo-optional - required for service start/stopping)
  • transmission-cli
  • ufw

Installation

ArchLinux

mkdir /tmp/pia-tools; cd !$
curl -O https://raw.githubusercontent.com/pschmitt/pia-tools/master/{PKGBUILD,pia-tools.install}
makepkg -si

Other distros

curl https://raw.githubusercontent.com/pschmitt/pia-tools/master/pia-tools > /usr/bin/pia-tools

MANPAGE

If you also want to have the MANPAGE:

curl https://raw.githubusercontent.com/pschmitt/pia-tools/master/pia-tools.groff | gzip -c - > $MAN_PATH/pia-tools.1.gz

Note: $MANPATH may not be defined, so you'll have to find out where to put the obtained file. On ArchLinux, this would be /usr/share/man/man1/

Systemd service file

curl https://raw.githubusercontent.com/pschmitt/pia-tools/master/[email protected] > /usr/lib/systemd/system/[email protected]

Post installation

First I recommend to create /etc/openvpn/pia and the required config files:

mkdir -p /etc/openvpn/pia

# Feel free to edit the up/down parameters
cat <<EOM > /etc/openvpn/pia/pia_common
auth-user-pass passwd
script-security 2
up "/usr/bin/pia-tools -g"
down "/usr/bin/pia-tools --restore-dns"
EOM

# Start interactive setup
pia-tools --setup

The setup will store your credentials in /etc/openvpn/pia/passwd, download the config files from PIA and append /etc/openvpn/pia/pia_common to all of them.

In order to download the config files again run pia-tools --update

Go! Go! GOOOOO!

systemctl start [email protected]

Sample config file

Path: /etc/pia-tools.conf

PIA_CONFIG_DIR='/etc/openvpn/pia'
PIA_CONFIG_URL='https://www.privateinternetaccess.com/openvpn/openvpn.zip'
PIA_COMMON_CONFIG="$PIA_CONFIG_DIR/pia_common"
PIA_SERVERS_FILE="$PIA_CONFIG_DIR/piaservers"
PIA_SERVERS_IP_FILE="$PIA_CONFIG_DIR/piaserverips"
PIA_PASSWD_FILE="$PIA_CONFIG_DIR/passwd"
PIA_CLIENT_ID_FILE="$PIA_CONFIG_DIR/clientid"
TRANSMISSION_SETTINGS_FILE='/home/dl/.config/transmission-daemon/settings.json'
PIA_OPEN_PORT_FILE="$PIA_CONFIG_DIR/open_port"
VIRT_NET_DEV='tun0'

Read more

If you installed the MANPAGE:

man pia-tools
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].