gnu: openvpn: Update to 2.3.9.
[jackhill/guix/guix.git] / gnu / packages / vpn.scm
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 Efraim Flashner <efraim@flashner.co.il>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages vpn)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages gettext)
31 #:use-module (gnu packages gnupg)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages tls)
36 #:use-module (gnu packages xml))
37
38 (define-public gvpe
39 (package
40 (name "gvpe")
41 (version "2.25")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "mirror://gnu/gvpe/gvpe-"
45 version ".tar.gz"))
46 (sha256
47 (base32
48 "1gsipcysvsk80gvyn9jnk9g0xg4ng9yd5zp066jnmpgs52d2vhvk"))))
49 (build-system gnu-build-system)
50 (home-page "http://software.schmorp.de/pkg/gvpe.html")
51 (inputs `(("openssl" ,openssl)
52 ("zlib" ,zlib)))
53 (synopsis "Secure VPN among multiple nodes over an untrusted network")
54 (description
55 "The GNU Virtual Private Ethernet creates a virtual network
56 with multiple nodes using a variety of transport protocols. It works
57 by creating encrypted host-to-host tunnels between multiple
58 endpoints.")
59 (license license:gpl3+)))
60
61 (define-public vpnc
62 (package
63 (name "vpnc")
64 (version "0.5.3")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "https://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-"
68 version ".tar.gz"))
69 (sha256 (base32
70 "1128860lis89g1s21hqxvap2nq426c9j4bvgghncc1zj0ays7kj6"))
71 (patches (search-patches "vpnc-script.patch"))))
72 (build-system gnu-build-system)
73 (inputs `(("libgcrypt" ,libgcrypt)
74 ("perl" ,perl)
75
76 ;; The following packages provide commands that 'vpnc-script'
77 ;; expects.
78 ("net-tools" ,net-tools) ;ifconfig, route
79 ("iproute2" ,iproute))) ;ip
80 (arguments
81 `(#:tests? #f ; there is no check target
82 #:phases
83 (modify-phases %standard-phases
84 (replace 'configure
85 (lambda* (#:key outputs #:allow-other-keys)
86 (let ((out (assoc-ref outputs "out")))
87 (substitute* "Makefile"
88 (("PREFIX=/usr/local") (string-append "PREFIX=" out)))
89 (substitute* "Makefile"
90 (("ETCDIR=/etc/vpnc") (string-append "ETCDIR=" out
91 "/etc/vpnc"))))))
92 (add-after 'install 'wrap-vpnc-script
93 (lambda* (#:key inputs outputs #:allow-other-keys)
94 ;; Wrap 'etc/vpnc/vpnc-script' so that it finds the commands it
95 ;; needs. Assume coreutils/grep/sed are in $PATH.
96 (let ((out (assoc-ref outputs "out")))
97 (wrap-program (string-append out "/etc/vpnc/vpnc-script")
98 `("PATH" ":" prefix
99 (,(string-append (assoc-ref inputs "net-tools")
100 "/sbin")
101 ,(string-append (assoc-ref inputs "net-tools")
102 "/bin")
103 ,(string-append (assoc-ref inputs "iproute2")
104 "/sbin"))))))))))
105 (synopsis "Client for Cisco VPN concentrators")
106 (description
107 "vpnc is a VPN client compatible with Cisco's EasyVPN equipment.
108 It supports IPSec (ESP) with Mode Configuration and Xauth. It supports only
109 shared-secret IPSec authentication with Xauth, AES (256, 192, 128), 3DES,
110 1DES, MD5, SHA1, DH1/2/5 and IP tunneling. It runs entirely in userspace.
111 Only \"Universal TUN/TAP device driver support\" is needed in the kernel.")
112 (license license:gpl2+) ; some file are bsd-2, see COPYING
113 (home-page "http://www.unix-ag.uni-kl.de/~massar/vpnc/")))
114
115
116 (define-public openconnect
117 (package
118 (name "openconnect")
119 (version "7.05")
120 (source (origin
121 (method url-fetch)
122 (uri (string-append "ftp://ftp.infradead.org/pub/openconnect/"
123 "openconnect-" version ".tar.gz"))
124 (sha256 (base32
125 "1i102yr8yp2ny587n6pd966443h1pqxyw5q0n5afq575046jj98g"))))
126 (build-system gnu-build-system)
127 (inputs
128 `(("libxml2" ,libxml2)
129 ("gnutls" ,gnutls)
130 ("vpnc" ,vpnc)
131 ("zlib" ,zlib)))
132 (native-inputs
133 `(("gettext" ,gnu-gettext)
134 ("pkg-config" ,pkg-config)))
135 (arguments
136 `(#:configure-flags
137 `(,(string-append "--with-vpnc-script="
138 (assoc-ref %build-inputs "vpnc")
139 "/etc/vpnc/vpnc-script"))))
140 (synopsis "Client for Cisco VPN")
141 (description
142 "OpenConnect is a client for Cisco's AnyConnect SSL VPN, which is
143 supported by the ASA5500 Series, by IOS 12.4(9)T or later on Cisco SR500,
144 870, 880, 1800, 2800, 3800, 7200 Series and Cisco 7301 Routers,
145 and probably others.")
146 (license license:lgpl2.1)
147 (home-page "http://www.infradead.org/openconnect/")))
148
149 (define-public openvpn
150 (package
151 (name "openvpn")
152 (version "2.3.9")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append
156 "https://swupdate.openvpn.org/community/releases/openvpn-"
157 version ".tar.xz"))
158 (sha256
159 (base32
160 "1hfwmdsp7s34qx34qgwrpp89h30744lbsks6y619cdh27bpnpwaj"))))
161 (build-system gnu-build-system)
162 (arguments
163 '(#:configure-flags '("--enable-iproute2=yes")))
164 (native-inputs
165 `(("iproute2" ,iproute)))
166 (inputs
167 `(("lzo" ,lzo)
168 ("openssl" ,openssl)
169 ("linux-pam" ,linux-pam)))
170 (home-page "https://openvpn.net/")
171 (synopsis "Virtual private network daemon")
172 (description "OpenVPN implements virtual private network (VPN) techniques
173 for creating secure point-to-point or site-to-site connections in routed or
174 bridged configurations and remote access facilities. It uses a custom
175 security protocol that utilizes SSL/TLS for key exchange. It is capable of
176 traversing network address translators (NATs) and firewalls.")
177 (license license:gpl2)))
178
179 (define-public tinc
180 (package
181 (name "tinc")
182 (version "1.0.26")
183 (source (origin
184 (method url-fetch)
185 (uri (string-append "http://tinc-vpn.org/packages/"
186 name "-" version ".tar.gz"))
187 (sha256
188 (base32
189 "08ds8s32cjslms1q227ihd6jz35583v378ij4pknfa5xngfijhrb"))))
190 (build-system gnu-build-system)
191 (arguments
192 '(#:configure-flags
193 '("--sysconfdir=/etc"
194 "--localstatedir=/var")))
195 (inputs `(("zlib" ,zlib)
196 ("lzo" ,lzo)
197 ("openssl" ,openssl)))
198 (home-page "http://tinc-vpn.org")
199 (synopsis "Virtual Private Network (VPN) daemon")
200 (description
201 "Tinc is a VPN that uses tunnelling and encryption to create a secure
202 private network between hosts on the internet.")
203 (license license:gpl2+)))