aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2015-10-28 20:30:13 +0000
committerPawel Pekala <pawel@FreeBSD.org>2015-10-28 20:30:13 +0000
commit33eb4d6ebbbb169fd5d7ec02d191c126afe779ba (patch)
tree5986ed12f6b5f5a47c881a9aeb03893e0e319baf
parent3be601734e900ff133b9619a5af22e2da6595bda (diff)
downloadports-33eb4d6ebbbb169fd5d7ec02d191c126afe779ba.tar.gz
ports-33eb4d6ebbbb169fd5d7ec02d191c126afe779ba.zip
Notes
-rw-r--r--security/Makefile1
-rw-r--r--security/vm-to-tor/Makefile49
-rw-r--r--security/vm-to-tor/distinfo2
-rw-r--r--security/vm-to-tor/files/pkg-message.in42
-rw-r--r--security/vm-to-tor/pkg-descr4
5 files changed, 98 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index fd4c350fa282..d80d0367fe77 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -1078,6 +1078,7 @@
SUBDIR += vinetto
SUBDIR += vlock
SUBDIR += vlog
+ SUBDIR += vm-to-tor
SUBDIR += vnccrack
SUBDIR += vpnc
SUBDIR += vuxml
diff --git a/security/vm-to-tor/Makefile b/security/vm-to-tor/Makefile
new file mode 100644
index 000000000000..2153dff00f12
--- /dev/null
+++ b/security/vm-to-tor/Makefile
@@ -0,0 +1,49 @@
+# Created by: Yuri Victorovich <yuri@rawbw.com>
+# $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 <bsd.port.pre.mk>
+
+.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 <bsd.port.post.mk>
diff --git a/security/vm-to-tor/distinfo b/security/vm-to-tor/distinfo
new file mode 100644
index 000000000000..b5dc48636100
--- /dev/null
+++ b/security/vm-to-tor/distinfo
@@ -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
diff --git a/security/vm-to-tor/files/pkg-message.in b/security/vm-to-tor/files/pkg-message.in
new file mode 100644
index 000000000000..33a555956723
--- /dev/null
+++ b/security/vm-to-tor/files/pkg-message.in
@@ -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.
+======================================================================
diff --git a/security/vm-to-tor/pkg-descr b/security/vm-to-tor/pkg-descr
new file mode 100644
index 000000000000..11da3b7c1b3c
--- /dev/null
+++ b/security/vm-to-tor/pkg-descr
@@ -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