I thought about a way to simplify the installation of your VPN-Script & the deployment of a VPN-Proxy VPN even further.
My Qubes-Installation & configuration is all done by scripts which I start from dom0, this allowas to rebuild my complete Qubes system without much work.
I have written a scripted install, which is building a VPN-ProxyVM based on my own sys-template for sys-net / sys-usb / sys-firewall (which is itself based on a fedora-29-minimal template).
All steps to build the vpn-proxy VPN including configuration for
privateinternetaccess.com is done through the script. Only step has to be done manually:
Adding vpn-handler-openvpn to the Qubes Setting / Services Tab.
QUESTION:
I know that this can also be done via dom0 CLI, but I am missing the right command.
Can someone help?
[799]
PS: This is the script, which will build the VPN-ProxyVM.
(Hint: I like to keep my templates small and therefor packages which I only need during setup will be installed in the AppVM (and be lost on reboot). In this case git/unzip/wget are only used to setup everything - they're not needed for running the ProxyVPN):
---- start ----
Template=t-fedora-29-sys
AppVM=sys-vpn2
qvm-create --template=$Template --label=blue $AppVM
qvm-prefs --set $AppVM provides_network True
qvm-run --auto --pass-io --no-gui --user root $AppVM \
'dnf install -y git wget unzip && \
mkdir -p /rw/config/vpn && \
cd /root && \
git clone
https://github.com/tasket/Qubes-vpn-support.git && \
cd Qubes-vpn-support && \
bash ./install'
qvm-run --auto --pass-io --no-gui --user root $AppVM \
'cd /rw/config/vpn && \
wget
https://www.privateinternetaccess.com/openvpn/openvpn-ip.zip && \
unzip openvpn-ip.zip && \
# Link to your favorite VPN-Entry Point here I'm using Switzerland && \
ln -s Switzerland.ovpn vpn-client.conf'
qvm-shutdown --wait $AppVM
# MANUAL step (at the moment):
# Add "vpn-handler-openvpn" to the Settings > Services Tab
qvm-start $AppVM
---- end ----
As mentioned above the AppVM is based on my own sys-template named t-fedora-29-minimal.