View | Details | Raw Unified | Return to bug 60364
Collapse All | Expand All

(-)./Makefile (-14 / +28 lines)
Lines 1-32 Link Here
1
# New ports collection makefile for:	vpnc
1
# New ports collection makefile for:	vpnc
2
# Date created:			        15 December 2003
2
# Date created:        15 December 2003
3
# Whom:                			Christian Lackas
3
# Whom:                Christian Lackas
4
#
4
#
5
# $FreeBSD: ports/security/vpnc/Makefile,v 1.1 2003/12/17 15:19:50 krion Exp $
5
# $FreeBSD$
6
#
6
#
7
7
8
PORTNAME=	vpnc
8
PORTNAME=		vpnc
9
PORTVERSION=	0.2
9
PORTVERSION=	0.2
10
CATEGORIES=	security
10
PORTREVISION=	1
11
CATEGORIES=		security
11
MASTER_SITES=	http://www.unix-ag.uni-kl.de/~massar/vpnc/
12
MASTER_SITES=	http://www.unix-ag.uni-kl.de/~massar/vpnc/
12
DISTNAME=	${PORTNAME}-${PORTVERSION}-rm+zomb-pre6
13
DISTNAME=		${PORTNAME}-${PORTVERSION}-rm+zomb-pre6
13
14
14
MAINTAINER=	delta@lackas.net
15
MAINTAINER=		delta@lackas.net
15
COMMENT=	"Client for Cisco 3000 VPN Concentrator"
16
COMMENT=		Client for Cisco 3000 VPN Concentrator
16
17
17
LIB_DEPENDS=	gcrypt.6:${PORTSDIR}/security/libgcrypt
18
LIB_DEPENDS=	gcrypt.6:${PORTSDIR}/security/libgcrypt
18
19
19
USE_GMAKE=	yes
20
USE_GMAKE=		yes
20
ALL_TARGET=	vpnc
21
USE_REINPLACE=	yes
21
INSTALL_TARGET=
22
ALL_TARGET=		vpnc
22
23
23
post-install:
24
MAN8=vpnc.8
25
26
do-install:
24
	@${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${PREFIX}/sbin/vpnc
27
	@${INSTALL_PROGRAM} -m 751 ${WRKSRC}/vpnc ${PREFIX}/sbin/vpnc
25
	@${INSTALL_SCRIPT} -m 755 ${FILESDIR}/vpnc.sh ${PREFIX}/etc/rc.d/vpnc.sh.sample
28
	@${INSTALL_SCRIPT} -m 755 ${FILESDIR}/vpnc.sh ${PREFIX}/etc/rc.d/vpnc.sh.sample
29
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${PREFIX}/etc/rc.d/vpnc.sh.sample
26
	@${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc/vpnc.conf.sample
30
	@${INSTALL_DATA} -m 600 ${WRKSRC}/vpnc.conf ${PREFIX}/etc/vpnc.conf.sample
27
.if !defined(NOPORTDOCS)
31
.if !defined(NOPORTDOCS)
28
	${MKDIR} ${DOCSDIR}
32
		${MKDIR} ${DOCSDIR}
29
	@${INSTALL_DATA} -m 666 ${WRKSRC}/README ${DOCSDIR}
33
		@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
34
		@${INSTALL_DATA} ${WRKSRC}/ChangeLog	${DOCSDIR}
35
		@${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR}
36
.endif
37
.if !defined(NO_INSTALL_MANPAGES)
38
		@${INSTALL_MAN} ${FILESDIR}/vpnc.8 ${PREFIX}/man/man8
30
.endif
39
.endif
40
	@${CAT} ${PKGMESSAGE}
41
42
post-patch:
43
	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/vpnc.c
44
	@${REINPLACE_CMD} -e 's|%%CC%%|${CC}|;s|%%CFLAGS%%|${CFLAGS}|' ${WRKSRC}/Makefile
31
45
32
.include <bsd.port.mk>
46
.include <bsd.port.mk>
(-)./files/patch-Makefile (-4 / +5 lines)
Lines 1-14 Link Here
1
--- Makefile.orig	Sun Nov  2 01:21:39 2003
1
--- Makefile.orig	Sun Nov  2 01:21:39 2003
2
+++ Makefile	Wed Dec 17 13:08:35 2003
2
+++ Makefile	Wed Dec 17 09:56:14 2003
3
@@ -15,14 +15,14 @@
3
@@ -15,14 +15,14 @@
4
 # along with this program; if not, write to the Free Software
4
 # along with this program; if not, write to the Free Software
5
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
5
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
6
 
6
 
7
-CC=gcc
7
-CC=gcc
8
-CFLAGS=-W -Wall -O -g '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
8
-CFLAGS=-W -Wall -O -g '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
9
+CC?=gcc
9
-LDFLAGS=-g $(shell libgcrypt-config --libs)
10
+CFLAGS+=-W -Wall -O -g '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
10
+CC=%%CC%%
11
 LDFLAGS=-g $(shell libgcrypt-config --libs)
11
+CFLAGS=-W -Wall %%CFLAGS%% '-DVERSION="$(shell cat VERSION)"' $(shell libgcrypt-config --cflags)
12
+LDFLAGS=$(shell libgcrypt-config --libs)
12
 
13
 
13
 ifeq ($(shell uname -s), Linux)
14
 ifeq ($(shell uname -s), Linux)
14
 SYSDEP=sysdep-linux.o
15
 SYSDEP=sysdep-linux.o
(-)./files/patch-vpnc.c (-1 / +1 lines)
Lines 5-11 Link Here
5
       read_config_file (argv[i], config, 0);
5
       read_config_file (argv[i], config, 0);
6
 
6
 
7
-  read_config_file ("/etc/vpnc.conf", config, 1);
7
-  read_config_file ("/etc/vpnc.conf", config, 1);
8
+  read_config_file ("/usr/local/etc/vpnc.conf", config, 1);
8
+  read_config_file ("%%PREFIX%%/etc/vpnc.conf", config, 1);
9
 
9
 
10
   if (!config[CONFIG_IKE_DH])
10
   if (!config[CONFIG_IKE_DH])
11
     config[CONFIG_IKE_DH] = "dh2";
11
     config[CONFIG_IKE_DH] = "dh2";
(-)./files/vpnc.8 (+131 lines)
Line 0 Link Here
1
.\" Process this file with
2
.\" groff -man -Tascii vpnc.8
3
.\"
4
.TH VPNC 8 "December 2003" FreeBSD "vpnc"
5
.SH NAME
6
vpnc \- Client for Cisco 3000 VPN Concentrator
7
.SH SYNOPSIS
8
.B vpnc  [ --gateway 
9
.I IP-or-hostname
10
.B ] [ --id 
11
.I IPSec group Id
12
.B ] [ --username
13
.I name
14
.B ] [ --ifname 
15
.I name
16
.B ] [ --local-port
17
.I port number
18
.B ] [ --pid-file
19
.I filename
20
.B ] [ --dh 
21
.I IKE DH group
22
.B ] [ --pfs 
23
.I PFS group
24
.B ] [ --non-inter ] [ --debug ] [ --no-detach ] [ --print-config ]
25
.SH DESCRIPTION
26
.B vpnc
27
is a VPN client for the Cisco 3000 VPN Concentrator,
28
creating a IPSec-like connection as a tunneling
29
network device for the local system. It uses the
30
TUN/TAP driver in Linux kernel 2.4 and above and
31
device 
32
.BR tun (4)
33
on BSD.
34
35
The vpnc daemon by it self does not set any routes. The user
36
has to do it on its own, e.g. for a full tunnel under FreeBSD
37
38
.RS
39
.PD 0
40
route add -host VPNGATEWAY ROUTER
41
.P
42
route delete default
43
.P
44
route add default -interface tun0
45
.PD
46
.RE
47
.SH CONFIGURATION
48
The daemon reads configuration data from the following places:
49
.PD 0
50
.IP "- command line options"
51
.IP "- config file(s) specified on the command line"
52
.IP "- PREFIX/etc/vpnc.conf"
53
.IP "- prompting the user if not found above"
54
.PD
55
.SH OPTIONS
56
.IP "--gateway IP-or-hostname"
57
IP address or hostname of the VPN gateway
58
.IP "--id IPSec group Id"
59
ID of the IPSec group
60
.IP "--username name"
61
your user credentials
62
.IP "--ifname name"
63
name of the tun-interface to use
64
.IP "--local-port port number"
65
use this port for the connection <0-65535>, use 0 for random
66
.IP "--pid-file filename"
67
store the pid of background process there
68
.IP "--dh IKE DH group"
69
name of the IKE DH Group <dh1/dh2/dh5>
70
.IP "--pfs PFS group"
71
Perfect Forward Secrecy <nopfs/dh1/dh2/dh5>
72
.IP "--non-inter"
73
non interactive mode, don't ask any questions
74
.IP "--debug nr"
75
set debugging level <0/1/2/3/99>
76
.IP "--no-detach"
77
do not send daemon to background
78
.IP "--print-config"
79
prints your configuration; output can be used as vpnc.conf
80
81
.SH FILES
82
.I PREFIX/etc/vpnc.conf
83
.RS
84
The default configuration file. See
85
.BR EXAMPLES
86
for further details.
87
.RE
88
89
.SH EXAMPLES
90
This is an example vpnc.conf:
91
92
.RS
93
.PD 0
94
IKE DH Group dh2
95
.P
96
Perfect Forward Secrecy nopfs
97
.P
98
IPSec gateway vpn.rwth-aachen.de
99
.P
100
IPSec ID MoPS
101
.P
102
IPSec secret mopsWLAN
103
.P
104
Xauth username abcdef
105
.P
106
Xauth passwort 123456
107
.PD
108
.RE
109
110
The values start exactly one space after the keywords, and run to the end of
111
line. This lets you put any kind of weird character (except EOL and NUL) in
112
your strings, but it does mean you can't add comments after a string, or spaces
113
before them.
114
115
See also the
116
.B --print-config
117
option to generate a config file.
118
119
.SH TODO
120
Re-keying is no implemented yet (default rekey-intervall is 8 hours).
121
122
.SH AUTHOR
123
This man-page has been written by Christian Lackas <delta(at)lackas.net>,
124
based on the Debian man-page 
125
by Eduard Bloch <blade(at)debian.org> and the vpnc README by
126
Maurice Massar <vpnc(at)unix-ag.uni-kl.de>
127
128
.SH "SEE ALSO"
129
.BR tun (4),
130
.BR route (1),
131
.BR http://www.unix-ag.uni-kl.de/~massar/vpnc/
(-)./files/vpnc.sh (-4 / +17 lines)
Lines 1-12 Link Here
1
#!/bin/sh
1
#! /bin/sh
2
3
PREFIX=%%PREFIX%%
4
PIDFILE=/var/run/vpnc.pid
5
6
# change these variables and activate comments
7
# below to get a full tunnel
8
VPNGATEWAY=vpn.rwth-aachen.de
9
ROUTER=192.168.111.2
2
10
3
case "$1" in
11
case "$1" in
4
start)
12
start)
5
	[ -x /usr/local/sbin/vpnc ] && /usr/local/sbin/vpnc && echo -n ' vpnc'
13
	[ -x ${PREFIX}/sbin/vpnc ] && ${PREFIX}/sbin/vpnc --pid-file ${PIDFILE} &&
14
	# route add -host ${VPNGATEWAY} ${ROUTER}
15
	# route delete default && 
16
	# route add default -interface tun0 &&
17
	echo -n ' vpnc'
6
	;;
18
	;;
7
stop)
19
stop)
8
	#
20
	kill `cat ${PIDFILE}`
9
	kill
21
	# route delete default &&
22
	# route add default ${ROUTER}
10
	;;
23
	;;
11
*)
24
*)
12
	echo "Usage: `basename $0` {start|stop}" >&2
25
	echo "Usage: `basename $0` {start|stop}" >&2
(-)./pkg-descr (-1 / +1 lines)
Lines 3-8 Link Here
3
A VPN client compatible with Cisco's EasyVPN equipment.
3
A VPN client compatible with Cisco's EasyVPN equipment.
4
Supports IPSec (ESP) with Mode Configuration and Xauth. Supports only
4
Supports IPSec (ESP) with Mode Configuration and Xauth. Supports only
5
shared-secret IPSec authentication, 3DES, MD5, and IP tunneling.
5
shared-secret IPSec authentication, 3DES, MD5, and IP tunneling.
6
It runs entirely in userspace
6
It runs entirely in userspace.
7
7
8
WWW: http://www.unix-ag.uni-kl.de/~massar/vpnc/
8
WWW: http://www.unix-ag.uni-kl.de/~massar/vpnc/
(-)./pkg-message (+8 lines)
Line 0 Link Here
1
If vpnc fails with
2
3
    socket(SOCK_RAW): Protocol not supported
4
5
check your kernel configuration. The ESP protocol
6
is only enabled for FAST_IPSEC (this cannot be
7
configured together with IPSEC). See LINT for
8
further details.
(-)./pkg-plist (+2 lines)
Lines 2-5 Link Here
2
etc/vpnc.conf.sample
2
etc/vpnc.conf.sample
3
etc/rc.d/vpnc.sh.sample
3
etc/rc.d/vpnc.sh.sample
4
%%PORTDOCS%%%%DOCSDIR%%/README
4
%%PORTDOCS%%%%DOCSDIR%%/README
5
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
6
%%PORTDOCS%%%%DOCSDIR%%/TODO
5
%%PORTDOCS%%@dirrm %%DOCSDIR%%
7
%%PORTDOCS%%@dirrm %%DOCSDIR%%

Return to bug 60364