Date: Fri, 23 Aug 2019 12:50:32 +0000 (UTC) From: =?UTF-8?Q?Vin=c3=adcius_Zavam?= <egypcio@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r509645 - in head/security: . dsvpn dsvpn/files Message-ID: <201908231250.x7NCoWXB074592@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: egypcio Date: Fri Aug 23 12:50:32 2019 New Revision: 509645 URL: https://svnweb.freebsd.org/changeset/ports/509645 Log: [NEW PORT] security/dsvpn: Dead Simple VPN DSVPN is a Dead Simple VPN, designed to address the most common use case for using a VPN with a shared key. It works in 'server' or 'client' mode using TCP. WWW: https://github.com/jedisct1/dsvpn Added: head/security/dsvpn/ head/security/dsvpn/Makefile (contents, props changed) head/security/dsvpn/distinfo (contents, props changed) head/security/dsvpn/files/ head/security/dsvpn/files/dsvpn.in (contents, props changed) head/security/dsvpn/files/pkg-message.in (contents, props changed) head/security/dsvpn/pkg-descr (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Fri Aug 23 12:46:14 2019 (r509644) +++ head/security/Makefile Fri Aug 23 12:50:32 2019 (r509645) @@ -135,6 +135,7 @@ SUBDIR += dotdotpwn SUBDIR += dropbear SUBDIR += dsniff + SUBDIR += dsvpn SUBDIR += duo SUBDIR += easy-rsa SUBDIR += elixir-comeonin Added: head/security/dsvpn/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/dsvpn/Makefile Fri Aug 23 12:50:32 2019 (r509645) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= dsvpn +PORTVERSION= 0.1.3 +CATEGORIES= security net + +MAINTAINER= egypcio@FreeBSD.org +COMMENT= Dead Simple VPN + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USE_GITHUB= yes +GH_ACCOUNT= jedisct1 + +USE_RC_SUBR= ${PORTNAME} +PLIST_FILES= sbin/${PORTNAME} +SUB_FILES= pkg-message + +post-patch: + ${REINPLACE_CMD} 's/^CFLAGS.*/CFLAGS\?\=${CFLAGS} ${OPTFLAGS}/g' \ + ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin + +.include <bsd.port.mk> Added: head/security/dsvpn/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/dsvpn/distinfo Fri Aug 23 12:50:32 2019 (r509645) @@ -0,0 +1,3 @@ +TIMESTAMP = 1565251349 +SHA256 (jedisct1-dsvpn-0.1.3_GH0.tar.gz) = 47de11a47f1acb27be770f22e0487e8247df03600c5446864bf19f347c7cb2f3 +SIZE (jedisct1-dsvpn-0.1.3_GH0.tar.gz) = 22316 Added: head/security/dsvpn/files/dsvpn.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/dsvpn/files/dsvpn.in Fri Aug 23 12:50:32 2019 (r509645) @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: dsvpn +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# dsvpn_enable (bool) Default: NO +# dsvpn_key (str) Default: %%PREFIX%%/etc/dsvpn.key +# dsvpn_bind (str) Default: auto +# dsvpn_port (str) Default: 443 +# dsvpn_remote (str) Default: <empty> +# + +. /etc/rc.subr + +name="dsvpn" +rcvar="${name}_enable" +pidfile="/var/run/${name}.pid" +procname="%%PREFIX%%/sbin/${name}" + +: ${dsvpn_enable:="NO"} +: ${dsvpn_key:="%%PREFIX%%/etc/dsvpn.key"} +: ${dsvpn_bind:="auto"} +: ${dsvpn_port:="443"} +: ${dsvpn_remote:=""} + +required_files=${dsvpn_key} + +command=/usr/sbin/daemon +[ -z ${dsvpn_remote} ] && + command_args_dsvpn="server ${dsvpn_key} ${dsvpn_bind} ${dsvpn_port}" || \ + command_args_dsvpn="client ${dsvpn_key} ${dsvpn_remote} ${dsvpn_port}" +command_args="-o /var/log/${name}.log -p ${pidfile} ${procname} ${command_args_dsvpn}" + +load_rc_config $name +run_rc_command "$1" Added: head/security/dsvpn/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/dsvpn/files/pkg-message.in Fri Aug 23 12:50:32 2019 (r509645) @@ -0,0 +1,25 @@ +====================================================================== +DSVPN uses a shared secret. Create it with the following command: + + # dd if=/dev/urandom of=%%PREFIX%%/etc/dsvpn.key count=1 bs=2048 + +Example usage on the server (defaults to listen on 443/TCP): + + # sysrc dsvpn_enable=YES + # service dsvpn start + +Example usage on the client (i.e. server's IP is 10.20.30.40): + + # sysrc dsvpn_enable=YES + # sysrc dsvpn_remote=10.20.30.40 + # service dsvpn start + +Remember to retrieve the shared key from the server before starting it. + +If you were previously using a DNS resolver only accessible from the +local network, it won't be accessible through the VPN. That might be +the only thing you may have to change. Use a public resolver, a local +resolver, or DNSCrypt. + +The default network created by DSVPN is 192.168.192.0/24. +====================================================================== Added: head/security/dsvpn/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/dsvpn/pkg-descr Fri Aug 23 12:50:32 2019 (r509645) @@ -0,0 +1,4 @@ +DSVPN is a Dead Simple VPN, designed to address the most common use case for +using a VPN with a shared key. It works in 'server' or 'client' mode using TCP. + +WWW: https://github.com/jedisct1/dsvpn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908231250.x7NCoWXB074592>