Update vpn.md

This commit is contained in:
Daniel Gonzalez Gasull 2018-06-30 09:02:42 +08:00 committed by GitHub
parent 349f9ba7e1
commit 82b14042de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,8 @@ Set up a ProxyVM as a VPN gateway using NetworkManager
Edit `/rw/config/rc.local` and add these lines:
```bash
# Automatically connect to the VPN
# Automatically connect to the VPN once Internet is up
for i in {1..50}; do ping -c1 1.1.1.1 &> /dev/null && break; done
nmcli connection up file-vpn-conn passwd-file /rw/config/NM-system-connections/secrets/passwd-file.txt
```
You can find the actual "file-vpn-conn" in `/rw/config/NM-system-connections/`.
@ -68,8 +69,6 @@ Set up a ProxyVM as a VPN gateway using NetworkManager
And substitute "XXXXXXXXXXXXXX" for the actual password.
The contents of `passwd-file.txt` may differ depending on your VPN settings. See the [documentation for `nmcli up`](https://www.mankier.com/1/nmcli#up).
Troubleshooting: If you notice that the VPN doesn't autostart on hardware bootup but it does when restaring the VPN VM, try adding a slight delay in seconds in `/rw/config/rc.local` before the `nmcli` command, e.g. `sleep 2`.
5. (Optional) Make the network fail-close for the AppVMs if the connection to the VPN breaks.
Edit `/rw/config/qubes-firewall-user-script` and add these lines: