From 52060dfbdfac04938393b4fdc441415fa08abe6e Mon Sep 17 00:00:00 2001 From: neodarz Date: Tue, 6 Oct 2020 18:35:55 +0200 Subject: Another little update --- dotfiles/cheat/vpn | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'dotfiles/cheat/vpn') diff --git a/dotfiles/cheat/vpn b/dotfiles/cheat/vpn index 141e9cd..437c1ca 100644 --- a/dotfiles/cheat/vpn +++ b/dotfiles/cheat/vpn @@ -1,7 +1,16 @@ -nmcli device show wlp3s0 +# VPN per namespace (and so per program) -#Know other ip -/etc/openvpn/ipp.txt +https://github.com/slingamn/namespaced-openvpn -#Server perso -script is in /root/OpenVPN-install +``` +# create an openvpn tunnel in a new namespace, named `protected` by default: +sudo /path/to/namespaced-openvpn --config ./my_openvpn_config_file + +# start an unprivileged shell in the new namespace +# anything started from this shell will use the openvpn tunnel exclusively for connectivity: +sudo ip netns exec protected sudo -u $USER -i +``` + +``` +sudo systemctl start openvpn-client@neodarz-perso.service +``` -- cgit v1.2.1