gnu: Add python-argcomplete.
[jackhill/guix/guix.git] / gnu / packages / vpn.scm
CommitLineData
49f24f41
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
42c97811 3;;; Copyright © 2013, 2016 Ludovic Courtès <ludo@gnu.org>
d4bf49b1 4;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
feca8e2b 5;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
a8cdc49e 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
5c863d57 7;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
49f24f41
AE
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages vpn)
b5b73a82 25 #:use-module ((guix licenses) #:prefix license:)
49f24f41
AE
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
5c863d57 29 #:use-module (guix build-system python)
49f24f41 30 #:use-module (gnu packages)
71f4b81a 31 #:use-module (gnu packages compression)
1dba6407 32 #:use-module (gnu packages gettext)
49f24f41 33 #:use-module (gnu packages gnupg)
dc77f0d3 34 #:use-module (gnu packages linux)
71f4b81a
AE
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
5c863d57 37 #:use-module (gnu packages python)
a7fd7b68 38 #:use-module (gnu packages tls)
71f4b81a 39 #:use-module (gnu packages xml))
49f24f41 40
7af8a9b7
LC
41(define-public gvpe
42 (package
43 (name "gvpe")
3ded2761 44 (version "3.0")
7af8a9b7
LC
45 (source (origin
46 (method url-fetch)
47 (uri (string-append "mirror://gnu/gvpe/gvpe-"
48 version ".tar.gz"))
49 (sha256
50 (base32
3ded2761 51 "1v61mj25iyd91z0ir7cmradkkcm1ffbk52c96v293ibsvjs2s2hf"))))
7af8a9b7
LC
52 (build-system gnu-build-system)
53 (home-page "http://software.schmorp.de/pkg/gvpe.html")
54 (inputs `(("openssl" ,openssl)
55 ("zlib" ,zlib)))
56 (synopsis "Secure VPN among multiple nodes over an untrusted network")
57 (description
58 "The GNU Virtual Private Ethernet creates a virtual network
59with multiple nodes using a variety of transport protocols. It works
60by creating encrypted host-to-host tunnels between multiple
61endpoints.")
62 (license license:gpl3+)))
63
49f24f41
AE
64(define-public vpnc
65 (package
66 (name "vpnc")
67 (version "0.5.3")
68 (source (origin
69 (method url-fetch)
594360f5 70 (uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
49f24f41
AE
71 version ".tar.gz"))
72 (sha256 (base32
01eafd38 73 "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))
fc1adab1 74 (patches (search-patches "vpnc-script.patch"))))
49f24f41
AE
75 (build-system gnu-build-system)
76 (inputs `(("libgcrypt" ,libgcrypt)
42c97811
LC
77 ("perl" ,perl)
78
79 ;; The following packages provide commands that 'vpnc-script'
80 ;; expects.
81 ("net-tools" ,net-tools) ;ifconfig, route
82 ("iproute2" ,iproute))) ;ip
49f24f41
AE
83 (arguments
84 `(#:tests? #f ; there is no check target
49f24f41 85 #:phases
42c97811
LC
86 (modify-phases %standard-phases
87 (replace 'configure
88 (lambda* (#:key outputs #:allow-other-keys)
89 (let ((out (assoc-ref outputs "out")))
90 (substitute* "Makefile"
91 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
92 (substitute* "Makefile"
93 (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out
94 "/etc/vpnc"))))))
95 (add-after 'install 'wrap-vpnc-script
96 (lambda* (#:key inputs outputs #:allow-other-keys)
97 ;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it
98 ;; needs. Assume coreutils/grep/sed are in $PATH.
99 (let ((out (assoc-ref outputs "out")))
100 (wrap-program (string-append out "/etc/vpnc/vpnc-script")
101 `("PATH" ":" prefix
102 (,(string-append (assoc-ref inputs "net-tools")
103 "/sbin")
104 ,(string-append (assoc-ref inputs "net-tools")
105 "/bin")
106 ,(string-append (assoc-ref inputs "iproute2")
107 "/sbin"))))))))))
799dcdc4 108 (synopsis "Client for Cisco VPN concentrators")
49f24f41
AE
109 (description
110 "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
35b9e423 111It supports IPSec (ESP) with Mode Configuration and Xauth. It supports only
49f24f41 112shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
35b9e423 1131DES, MD5, SHA1, DH1/2/5 and IP tunneling. It runs entirely in userspace.
49f24f41
AE
114Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
115 (license license:gpl2+) ; some file are bsd-2, see COPYING
116 (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
71f4b81a
AE
117
118
119(define-public openconnect
120 (package
121 (name "openconnect")
373e765e 122 (version "7.07")
71f4b81a
AE
123 (source (origin
124 (method url-fetch)
d4bf49b1
EB
125 (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
126 "openconnect-" version ".tar.gz"))
71f4b81a 127 (sha256 (base32
373e765e 128 "0rl33f1g42hxzqfv2a33gls8cb77q4w432xkims1dnfwhzagrv7k"))))
71f4b81a
AE
129 (build-system gnu-build-system)
130 (inputs
c4c4cc05 131 `(("libxml2" ,libxml2)
060e365a 132 ("gnutls" ,gnutls)
71f4b81a
AE
133 ("vpnc" ,vpnc)
134 ("zlib" ,zlib)))
c4c4cc05 135 (native-inputs
b94a6ca0 136 `(("gettext" ,gettext-minimal)
c4c4cc05 137 ("pkg-config" ,pkg-config)))
71f4b81a 138 (arguments
d4bf49b1
EB
139 `(#:configure-flags
140 `(,(string-append "--with-vpnc-script="
141 (assoc-ref %build-inputs "vpnc")
142 "/etc/vpnc/vpnc-script"))))
799dcdc4 143 (synopsis "Client for Cisco VPN")
71f4b81a
AE
144 (description
145 "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is
146supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500,
147870, 880, 1800, 2800, 3800, 7200 Series and Cisco 7301 Routers,
148and probably others.")
149 (license license:lgpl2.1)
150 (home-page "http://www.infradead.org/openconnect/")))
dc77f0d3
DT
151
152(define-public openvpn
153 (package
154 (name "openvpn")
a8cdc49e 155 (version "2.3.9")
dc77f0d3
DT
156 (source (origin
157 (method url-fetch)
158 (uri (string-append
159 "https://swupdate.openvpn.org/community/releases/openvpn-"
160 version ".tar.xz"))
161 (sha256
162 (base32
a8cdc49e 163 "1hfwmdsp7s34qx34qgwrpp89h30744lbsks6y619cdh27bpnpwaj"))))
dc77f0d3
DT
164 (build-system gnu-build-system)
165 (arguments
166 '(#:configure-flags '("--enable-iproute2=yes")))
167 (native-inputs
168 `(("iproute2" ,iproute)))
169 (inputs
170 `(("lzo" ,lzo)
171 ("openssl" ,openssl)
172 ("linux-pam" ,linux-pam)))
173 (home-page "https://openvpn.net/")
174 (synopsis "Virtual private network daemon")
175 (description "OpenVPN implements virtual private network (VPN) techniques
176for creating secure point-to-point or site-to-site connections in routed or
177bridged configurations and remote access facilities. It uses a custom
178security protocol that utilizes SSL/TLS for key exchange. It is capable of
e881752c 179traversing network address translators (NATs) and firewalls.")
dc77f0d3 180 (license license:gpl2)))
feca8e2b
JM
181
182(define-public tinc
183 (package
184 (name "tinc")
7e19194d 185 (version "1.0.28")
feca8e2b
JM
186 (source (origin
187 (method url-fetch)
188 (uri (string-append "http://tinc-vpn.org/packages/"
189 name "-" version ".tar.gz"))
190 (sha256
191 (base32
7e19194d 192 "0i5kx3hza359nclyhb60kxlzqyx0phmg175350hww28g6scjcl0b"))))
feca8e2b 193 (build-system gnu-build-system)
7b770eca
SB
194 (arguments
195 '(#:configure-flags
196 '("--sysconfdir=/etc"
197 "--localstatedir=/var")))
feca8e2b
JM
198 (inputs `(("zlib" ,zlib)
199 ("lzo" ,lzo)
200 ("openssl" ,openssl)))
201 (home-page "http://tinc-vpn.org")
202 (synopsis "Virtual Private Network (VPN) daemon")
203 (description
204 "Tinc is a VPN that uses tunnelling and encryption to create a secure
205private network between hosts on the internet.")
206 (license license:gpl2+)))
5c863d57
TGR
207
208(define-public sshuttle
209 (package
210 (name "sshuttle")
211 (version "0.78.1")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri name version))
216 (sha256
217 (base32
218 "0g1dpqigz02vafzh84z5990lnj9d95raknav0xmf0va7rr41d9q3"))))
219 (build-system python-build-system)
220 (native-inputs
221 `(("python-pytest-runner" ,python-pytest-runner)
222 ("python-setuptools-scm" ,python-setuptools-scm)
223 ;; For tests only.
224 ("python-mock" ,python-mock)
225 ("python-pytest" ,python-pytest)))
226 (home-page "https://github.com/sshuttle/sshuttle")
227 (synopsis "VPN that transparently forwards connections over SSH")
228 (description "sshuttle creates an encrypted virtual private network (VPN)
229connection to any remote server to which you have secure shell (SSH) access.
230The only requirement is a suitable version of Python on the server;
231administrative privileges are required only on the client. Unlike most VPNs,
232sshuttle forwards entire sessions, not packets, using kernel transparent
233proxying. This makes it faster and more reliable than SSH's own tunneling and
234port forwarding features. It can forward both TCP and UDP traffic, including
235DNS domain name queries.")
236 (license license:lgpl2.0))) ; incorrectly identified as GPL in ‘setup.py’