mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 11:43:03 +03:00
fix(guix): VPN
This commit is contained in:
parent
33ecd0197e
commit
fc68c8d0eb
4 changed files with 6 additions and 6 deletions
4
Guix.org
4
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.
|
=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
|
- Manually fix =etc/resolv.conf= to prevent DNS leaks
|
||||||
#+begin_src sh :tangle ~/bin/scripts/fix-resolve-conf
|
#+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
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -605,7 +605,7 @@ fi
|
||||||
# pkexec nmcli con modify "$CONN" ipv6.method ignore
|
# pkexec nmcli con modify "$CONN" ipv6.method ignore
|
||||||
# nmcli connection up "$CONN"
|
# nmcli connection up "$CONN"
|
||||||
# fi
|
# 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
|
#+end_src
|
||||||
|
|
||||||
*** +vpn-stop+
|
*** +vpn-stop+
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# [[file:../../Guix.org::*VPN][VPN:5]]
|
# [[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
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
# VPN:5 ends here
|
# VPN:5 ends here
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@ fi
|
||||||
# pkexec nmcli con modify "$CONN" ipv6.method ignore
|
# pkexec nmcli con modify "$CONN" ipv6.method ignore
|
||||||
# nmcli connection up "$CONN"
|
# nmcli connection up "$CONN"
|
||||||
# fi
|
# 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
|
# vpn-start:1 ends here
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/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')
|
CONN=$(nmcli -f NAME con show --active | grep -Ev "(.*docker.*|NAME|br-.*|veth.*|tun.*)" | sed 's/ *$//g')
|
||||||
echo "Connection: $CONN"
|
echo "Connection: $CONN"
|
||||||
|
|
||||||
pkexec nmcli con modify "$CONN" ipv6.method auto
|
pkexec nmcli con modify "$CONN" ipv6.method auto
|
||||||
nmcli connection up "$CONN"
|
nmcli connection up "$CONN"
|
||||||
# vpn-stop:1 ends here
|
# +vpn-stop+:1 ends here
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue