From owner-svn-ports-head@freebsd.org Wed Oct 28 20:30:14 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6632A20656; Wed, 28 Oct 2015 20:30:14 +0000 (UTC) (envelope-from pawel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9576412DF; Wed, 28 Oct 2015 20:30:14 +0000 (UTC) (envelope-from pawel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9SKUD9K003165; Wed, 28 Oct 2015 20:30:13 GMT (envelope-from pawel@FreeBSD.org) Received: (from pawel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9SKUDOH003158; Wed, 28 Oct 2015 20:30:13 GMT (envelope-from pawel@FreeBSD.org) Message-Id: <201510282030.t9SKUDOH003158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pawel set sender to pawel@FreeBSD.org using -f From: Pawel Pekala Date: Wed, 28 Oct 2015 20:30:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400416 - in head/security: . vm-to-tor vm-to-tor/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2015 20:30:15 -0000 Author: pawel Date: Wed Oct 28 20:30:13 2015 New Revision: 400416 URL: https://svnweb.freebsd.org/changeset/ports/400416 Log: Framework to connect any number of virtual machines to the tor anonymity network. WWW: https://github.com/yurivict/vm-to-tor PR: 200333 Submitted by: Yuri Victorovich Added: head/security/vm-to-tor/ head/security/vm-to-tor/Makefile (contents, props changed) head/security/vm-to-tor/distinfo (contents, props changed) head/security/vm-to-tor/files/ head/security/vm-to-tor/files/pkg-message.in (contents, props changed) head/security/vm-to-tor/pkg-descr (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Wed Oct 28 20:29:14 2015 (r400415) +++ head/security/Makefile Wed Oct 28 20:30:13 2015 (r400416) @@ -1078,6 +1078,7 @@ SUBDIR += vinetto SUBDIR += vlock SUBDIR += vlog + SUBDIR += vm-to-tor SUBDIR += vnccrack SUBDIR += vpnc SUBDIR += vuxml Added: head/security/vm-to-tor/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/vm-to-tor/Makefile Wed Oct 28 20:30:13 2015 (r400416) @@ -0,0 +1,49 @@ +# Created by: Yuri Victorovich +# $FreeBSD$ + +PORTNAME= vm-to-tor +PORTVERSION= 0.150519 +CATEGORIES= security net + +MAINTAINER= yuri@rawbw.com +COMMENT= Connect virtual machines to the tor network + +LICENSE= BSD4CLAUSE + +RUN_DEPENDS= tor:${PORTSDIR}/security/tor \ + tiny-dhcp-server:${PORTSDIR}/net/tiny-network-utilities + +USE_GITHUB= yes +GH_ACCOUNT= yurivict +GH_TAGNAME= 17bdb91 + +NO_BUILD= yes +NO_ARCH= yes +SUB_FILES= pkg-message + +PLIST_FILES+= etc/rc.d/${PORTNAME} bin/vm-ctrl +PLIST_FILES+= "@sample etc/${PORTNAME}.rc.conf.simple.sample" +PLIST_FILES+= "@sample etc/${PORTNAME}.rc.conf.complex.sample" + +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 +BROKEN= Does not work on FreeBSD versions earlier than 10 +.endif + +post-patch: + @${REINPLACE_CMD} 's|"/usr/local"|"${LOCALBASE}"|' \ + ${WRKSRC}/${PORTNAME} + @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' \ + -e 's|etc/rc\.conf\.|etc/${PORTNAME}.rc.conf.|' \ + ${WRKSRC}/rc.conf.*.sample + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKSRC}/vm-ctrl ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/rc.conf.simple.sample \ + ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.rc.conf.simple.sample + ${INSTALL_SCRIPT} ${WRKSRC}/rc.conf.complex.sample \ + ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.rc.conf.complex.sample + +.include Added: head/security/vm-to-tor/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/vm-to-tor/distinfo Wed Oct 28 20:30:13 2015 (r400416) @@ -0,0 +1,2 @@ +SHA256 (yurivict-vm-to-tor-0.150519-17bdb91_GH0.tar.gz) = cc7255f0bfac1e29a4a00fd30e7903495fc46b7e4390ead999416cf6df375c8b +SIZE (yurivict-vm-to-tor-0.150519-17bdb91_GH0.tar.gz) = 12564 Added: head/security/vm-to-tor/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/vm-to-tor/files/pkg-message.in Wed Oct 28 20:30:13 2015 (r400416) @@ -0,0 +1,42 @@ +====================================================================== +You installed vm-to-tor: framework that allows to connect virtual +machines to the tor network. + +It requires sysctl variable net.link.tap.user_open=1 set in +/etc/sysctl.conf. + +To start vm-to-tor manually, you can use this command: +# service vm-to-tor onestart +This will connect an adapter tap0 to tor. Then you need to change +settings of one virtual machine to use tap0 interface (in VirtualBox +you need to set "Bridged Adapter" as a network type and choose tap0 +as an adapter name, in bhyve tap0 will just work). + +To enable at system startup, you can add one of these lines: +. %%PREFIX%%/etc/vm-to-tor.rc.conf.simple +or +. %%PREFIX%%/etc/vm-to-tor.rc.conf.complex +to /etc/rc.conf, and modify %%PREFIX%%/etc/vm-to-tor.rc.conf.* +according to your needs. Please read there the explanation of +vm-to-tor features. + +Before changing configuration, you need to stop vm-to-tor with +# service vm-to-tor {one}stop +After changing configuration, you need to start it again: +# service vm-to-tor start + +To see the status of vm-to-tor: +# service vm-to-tor status + +To connect to the virtual machine tap1 with ssh: +# ssh 172.16.1.2 + +To change tor router setting for machine tapN with ctrl protocol: +# vm-ctrl tapN + +By design, you can't connect to the host from the virtual machine for +security reasons. Machine is isolated from the host environment, and +is not host-aware. Besides the optional NFS connection, all +communication initiated by the virtual machine happens only through +tor. +====================================================================== Added: head/security/vm-to-tor/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/vm-to-tor/pkg-descr Wed Oct 28 20:30:13 2015 (r400416) @@ -0,0 +1,4 @@ +Framework to connect any number of virtual machines to the +tor anonymity network. + +WWW: https://github.com/yurivict/vm-to-tor