From fc68c8d0eb8ce9455a8fb12358d83515d073e82c Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Tue, 27 Dec 2022 10:24:40 +0300 Subject: [PATCH] fix(guix): VPN --- Guix.org | 4 ++-- bin/scripts/fix-resolve-conf | 2 +- bin/scripts/vpn-start | 2 +- bin/scripts/vpn-stop | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Guix.org b/Guix.org index 46b59a5..c8ff162 100644 --- a/Guix.org +++ b/Guix.org @@ -546,7 +546,7 @@ I'm using Mullvad VPN. The =~/.vpn= folder stores its OpenVPN config (=openvpn.o =setenv PATH= is necessary because both =resolvconf= (openresolve) and =update-resolv-conf.sh= are shell scripts which need GNU coreutils and stuff, and OpenVPN clears PATH by default. - Manually fix =etc/resolv.conf= to prevent DNS leaks #+begin_src sh :tangle ~/bin/scripts/fix-resolve-conf - cp /etc/resolv.conf /etc/resolv.conf-bak + /home/pavel/.guix-extra-profiles/console/console/bin/cp /etc/resolv.conf /etc/resolv.conf-bak echo "nameserver 8.8.8.8" > /etc/resolv.conf #+end_src @@ -605,7 +605,7 @@ fi # pkexec nmcli con modify "$CONN" ipv6.method ignore # nmcli connection up "$CONN" # fi -pkexec openvpn --config ~/.vpn/mullvad_openvpn_linux_lv_rix/mullvad_lv_rix.conf +pkexec openvpn --config ~/.vpn/mullvad_openvpn_linux_fi_hel/mullvad_fi_hel.conf #+end_src *** +vpn-stop+ diff --git a/bin/scripts/fix-resolve-conf b/bin/scripts/fix-resolve-conf index 177d846..6f14b77 100755 --- a/bin/scripts/fix-resolve-conf +++ b/bin/scripts/fix-resolve-conf @@ -1,5 +1,5 @@ #!/bin/sh # [[file:../../Guix.org::*VPN][VPN:5]] -cp /etc/resolv.conf /etc/resolv.conf-bak +/home/pavel/.guix-extra-profiles/console/console/bin/cp /etc/resolv.conf /etc/resolv.conf-bak echo "nameserver 8.8.8.8" > /etc/resolv.conf # VPN:5 ends here diff --git a/bin/scripts/vpn-start b/bin/scripts/vpn-start index 8f56e9e..3e1b207 100755 --- a/bin/scripts/vpn-start +++ b/bin/scripts/vpn-start @@ -16,5 +16,5 @@ fi # pkexec nmcli con modify "$CONN" ipv6.method ignore # nmcli connection up "$CONN" # fi -pkexec openvpn --config ~/.vpn/mullvad_openvpn_linux_lv_rix/mullvad_lv_rix.conf +pkexec openvpn --config ~/.vpn/mullvad_openvpn_linux_fi_hel/mullvad_fi_hel.conf # vpn-start:1 ends here diff --git a/bin/scripts/vpn-stop b/bin/scripts/vpn-stop index f95f619..2060381 100755 --- a/bin/scripts/vpn-stop +++ b/bin/scripts/vpn-stop @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# [[file:../../Guix.org::*vpn-stop][vpn-stop:1]] +# [[file:../../Guix.org::*+vpn-stop+][+vpn-stop+:1]] CONN=$(nmcli -f NAME con show --active | grep -Ev "(.*docker.*|NAME|br-.*|veth.*|tun.*)" | sed 's/ *$//g') echo "Connection: $CONN" pkexec nmcli con modify "$CONN" ipv6.method auto nmcli connection up "$CONN" -# vpn-stop:1 ends here +# +vpn-stop+:1 ends here