From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Massmann Subject: Re: openvpn with networkmanager Date: Mon, 10 Sep 2018 12:05:56 -0400 Message-ID: <87r2i1jq1n.fsf@gmail.com> References: <8736up6w7l.fsf@jnanam.net> <871sa3dl35.fsf@gnu.org> <87in3e7zac.fsf@jnanam.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzOjl-0007KN-DI for help-guix@gnu.org; Mon, 10 Sep 2018 12:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzOjg-0003IM-UW for help-guix@gnu.org; Mon, 10 Sep 2018 12:08:28 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:46305) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fzOja-0007zs-RI for help-guix@gnu.org; Mon, 10 Sep 2018 12:08:23 -0400 Received: by mail-qk1-x72b.google.com with SMTP id j7-v6so14687482qkd.13 for ; Mon, 10 Sep 2018 09:06:12 -0700 (PDT) In-Reply-To: <87in3e7zac.fsf@jnanam.net> (Benjamin Slade's message of "Sun, 09 Sep 2018 22:27:07 -0600") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Benjamin Slade Cc: Guix-Help --=-=-= Content-Type: text/plain Hi Ben, Benjamin Slade writes: > > What is a recommended/working way of using OpenVPN on GuixSD? I do not know what the recommended way of working with openvpn is, but I do have a working way. Attached is a bash script that takes a wireless interface as an argument and starts up a vpn, adjusting dns to avoid dns leaks (you will need to modify to add the dns for your setup). So if I have a wifi connection called "interface" I just run ```vpn-launcher-example.sh interface``` to start my vpn session, and then ```vpn-killer-example.sh interface``` to cleanup the connection after I have finished openvpn. Also depending on your setup you might need to either run as root, or sprinkle sudos before the nmcli calls. This works well for me, but I strongly doubt it is the recommended way using openvpn. If anyone has a better way I'd also love to hear it. Best, Adam --=-=-= Content-Type: application/x-sh Content-Disposition: attachment; filename=vpn-launcher-example.sh Content-Transfer-Encoding: base64 IyEgL3J1bi9jdXJyZW50LXN5c3RlbS9wcm9maWxlL2Jpbi9iYXNoCmlwPSQoaWZjb25maWcgIHwg Z3JlcCAnaW5ldCBhZGRyOid8IGdyZXAgLXYgJzEyNy4wLjAuMScgfCBjdXQgLWQ6IC1mMiB8IGF3 ayAneyBwcmludCAkMX0nKQpubWNsaSBjb24gbW9kaWZ5ICIkQCIgaXB2NC5hZGRyZXNzZXMgIiR7 aXB9LzI0IgpubWNsaSBjb24gbW9kaWZ5ICIkQCIgaXB2NC5nYXRld2F5ICIxOTIuMTY4LjAuMSIK bm1jbGkgY29uIG1vZGlmeSAiJEAiIGlwdjQubWV0aG9kIG1hbnVhbApubWNsaSBjb24gbW9kaWZ5 ICIkQCIgaXB2NC5pZ25vcmUtYXV0by1kbnMgeWVzCm5tY2xpIGNvbiBtb2RpZnkgIiRAIiAraXB2 NC5kbnMgPHZwbiBkbnMgZS5nLiAxOTkuMTk5LjE5LjE5OT4Kbm1jbGkgY29uIG1vZGlmeSAiJEAi ICtpcHY0LmRucyA8dnBuIGRucyBlLmcuIDE5OS4xOTkuMTkuMTk4PgpubWNsaSBjb24gbW9kaWZ5 ICIkQCIgLWlwdjQuZG5zIDxyb3V0ZXIgZG5zIGUuZy4gMTkyLjE2OC4wLjE+Cm5tY2xpIGNvbiBt b2RpZnkgIiRAIiBpcHY2Lm1ldGhvZCBpZ25vcmUKbm1jbGkgY29ubmVjdGlvbiB1cCAiJEAiCm9w ZW52cG4gL3BhdGgvdG8vd2hhdGV2ZXIub3Zwbgo= --=-=-= Content-Type: application/x-sh Content-Disposition: attachment; filename=vpn-killer-example.sh Content-Transfer-Encoding: base64 IyEgL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