Sudo chmod +x /etc/openvpn/portforward.shĮdit the script to provide PIA username and pass, and Transmission user/pass (if you have that configured.) The variables to change are USERNAME,PASSWORD, TRANSUSER, and TRANSPASS Here is the current list.ĭownload script to pia directory sudo wget -O /etc/openvpn/pia/portforward.sh Note: PIA only supports port forwarding from specific regions. I took the script from this guide and tweaked it a bit to suit my needs (and to correct a syntax error) PIA is awesome because it supports port forwarding to facilitate things like torrents. Start the service (or reboot) and then use curl to verify your external IP has changed sudo systemctl start pia.service Reload systemd daemons and enable at boot: sudo systemctl daemon-reload Test if it’s working by manually running OpenVPN sudo openvpn -config /etc/openvpn/PIA_SITE_FILENAME.ovpn -auth-user-pass /etc/openvpn/pia/.secretĬreate a systemd service file to get OpenVPN to run on startup sudo vim /usr/lib/systemd/system/pia.serviceĮxecStart=/usr/sbin/openvpn -daemon -config "/etc/openvpn/PIA_SITE_FILENAME.ovpn" -auth-user-pass /etc/openvpn/.secret #Change permissions to be readable only by root #Enter PIA credentials into the file, then save and exit The format is simply the first line being your PIA username, and the second line being your PIA password, nothing else. Now create a credentials file to specify your PIA username and password. Sudo unzip openvpn.zip -d /etc/openvpn/pia Next grab PIA’s ovpn files for their servers: wget I then used this guide to help me set up port forwarding to work with transmission-daemon.įirst, install openvpn & iproute sudo yum -y install openvpn I tweaked it a bit to work with CentOS 7. I followed this guide from to get me going. Fortunately, PIA provides ovpn files that fully work with the openVPN software, which does work headlessly. Unfortunately PIA software requires a GUI to work. I wanted to initiate a connection to my VPN provider Private Internet Access (PIA) from one of my headless CentOS 7 servers.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |