1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
6 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages vpn)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages gnupg)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages tls)
40 #:use-module (gnu packages xml))
48 (uri (string-append "mirror://gnu/gvpe/gvpe-"
52 "1v61mj25iyd91z0ir7cmradkkcm1ffbk52c96v293ibsvjs2s2hf"))))
53 (build-system gnu-build-system)
54 (home-page "http://software.schmorp.de/pkg/gvpe.html")
55 (inputs `(("openssl" ,openssl)
57 (synopsis "Secure VPN among multiple nodes over an untrusted network")
59 "The GNU Virtual Private Ethernet creates a virtual network
60 with multiple nodes using a variety of transport protocols. It works
61 by creating encrypted host-to-host tunnels between multiple
63 (license license:gpl3+)))
71 (uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
74 "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))
75 (patches (search-patches "vpnc-script.patch"))))
76 (build-system gnu-build-system)
77 (inputs `(("libgcrypt" ,libgcrypt)
80 ;; The following packages provide commands that 'vpnc-script'
82 ("net-tools" ,net-tools) ;ifconfig, route
83 ("iproute2" ,iproute))) ;ip
85 `(#:tests? #f ; there is no check target
87 (modify-phases %standard-phases
89 (lambda* (#:key outputs #:allow-other-keys)
90 (let ((out (assoc-ref outputs "out")))
91 (substitute* "Makefile"
92 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
93 (substitute* "Makefile"
94 (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out
96 (add-after 'install 'wrap-vpnc-script
97 (lambda* (#:key inputs outputs #:allow-other-keys)
98 ;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it
99 ;; needs. Assume coreutils/grep/sed are in $PATH.
100 (let ((out (assoc-ref outputs "out")))
101 (wrap-program (string-append out "/etc/vpnc/vpnc-script")
103 (,(string-append (assoc-ref inputs "net-tools")
105 ,(string-append (assoc-ref inputs "net-tools")
107 ,(string-append (assoc-ref inputs "iproute2")
109 (synopsis "Client for Cisco VPN concentrators")
111 "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
112 It supports IPSec (ESP) with Mode Configuration and Xauth. It supports only
113 shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
114 1DES, MD5, SHA1, DH1/2/5 and IP tunneling. It runs entirely in userspace.
115 Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
116 (license license:gpl2+) ; some file are bsd-2, see COPYING
117 (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
120 (define-public openconnect
126 (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
127 "openconnect-" version ".tar.gz"))
129 "00wacb79l2c45f94gxs63b9z25wlciarasvjrb8jb8566wgyqi0w"))))
130 (build-system gnu-build-system)
132 `(("libxml2" ,libxml2)
137 `(("gettext" ,gettext-minimal)
138 ("pkg-config" ,pkg-config)))
141 `(,(string-append "--with-vpnc-script="
142 (assoc-ref %build-inputs "vpnc")
143 "/etc/vpnc/vpnc-script"))))
144 (synopsis "Client for Cisco VPN")
146 "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is
147 supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500,
148 870, 880, 1800, 2800, 3800, 7200 Series and Cisco 7301 Routers,
149 and probably others.")
150 (license license:lgpl2.1)
151 (home-page "http://www.infradead.org/openconnect/")))
153 (define-public openvpn
160 "https://swupdate.openvpn.org/community/releases/openvpn-"
164 "1yrnvvnap2ghqas10l8jfg3njx57b8swh3n9wyp556qqgz4mzq8m"))))
165 (build-system gnu-build-system)
167 '(#:configure-flags '("--enable-iproute2=yes")))
169 `(("iproute2" ,iproute)))
173 ("linux-pam" ,linux-pam)))
174 (home-page "https://openvpn.net/")
175 (synopsis "Virtual private network daemon")
176 (description "OpenVPN implements virtual private network (VPN) techniques
177 for creating secure point-to-point or site-to-site connections in routed or
178 bridged configurations and remote access facilities. It uses a custom
179 security protocol that utilizes SSL/TLS for key exchange. It is capable of
180 traversing network address translators (NATs) and firewalls.")
181 (license license:gpl2)))
189 (uri (string-append "http://tinc-vpn.org/packages/"
190 name "-" version ".tar.gz"))
193 "0i5kx3hza359nclyhb60kxlzqyx0phmg175350hww28g6scjcl0b"))))
194 (build-system gnu-build-system)
197 '("--sysconfdir=/etc"
198 "--localstatedir=/var")))
199 (inputs `(("zlib" ,zlib)
201 ("openssl" ,openssl)))
202 (home-page "http://tinc-vpn.org")
203 (synopsis "Virtual Private Network (VPN) daemon")
205 "Tinc is a VPN that uses tunnelling and encryption to create a secure
206 private network between hosts on the internet.")
207 (license license:gpl2+)))
209 (define-public sshuttle
216 (uri (pypi-uri name version))
219 "12xyq5h77b57cnkljdk8qyjxzys512b73019s20x6ck5brj1m8wa"))))
220 (build-system python-build-system)
222 `(("python-setuptools-scm" ,python-setuptools-scm)
224 ("python-mock" ,python-mock)
225 ("python-pytest" ,python-pytest)
226 ("python-pytest-runner" ,python-pytest-runner)))
227 (home-page "https://github.com/sshuttle/sshuttle")
228 (synopsis "VPN that transparently forwards connections over SSH")
229 (description "sshuttle creates an encrypted virtual private network (VPN)
230 connection to any remote server to which you have secure shell (SSH) access.
231 The only requirement is a suitable version of Python on the server;
232 administrative privileges are required only on the client. Unlike most VPNs,
233 sshuttle forwards entire sessions, not packets, using kernel transparent
234 proxying. This makes it faster and more reliable than SSH's own tunneling and
235 port forwarding features. It can forward both TCP and UDP traffic, including
236 DNS domain name queries.")
237 (license license:lgpl2.0))) ; incorrectly identified as GPL in ‘setup.py’
239 (define-public sshoot
246 (uri (pypi-uri name version))
249 "1ccgh0hjyxrwkgy3hnxz3hgbjbs0lmfs25d5l5jam0xbpcpj63h0"))))
250 (build-system python-build-system)
253 (modify-phases %standard-phases
254 (add-after 'unpack 'patch-paths
256 (substitute* "sshoot/tests/test_manager.py"
257 (("/bin/sh") (which "sh")))
260 `(("python-argcomplete" ,python-argcomplete)
261 ("python-prettytable" ,python-prettytable)
262 ("python-pyyaml" ,python-pyyaml)))
265 `(("python-fixtures" ,python-fixtures)
266 ("python-pbr" ,python-pbr)
267 ("python-testtools" ,python-testtools)))
268 (home-page "https://github.com/albertodonato/sshoot")
269 (synopsis "sshuttle VPN session manager")
270 (description "sshoot provides a command-line interface to manage multiple
271 @command{sshuttle} virtual private networks. It supports flexible profiles
272 with configuration options for most of @command{sshuttle}’s features.")
273 (license license:gpl3+)))