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 <yuri@rawbw.com>
This commit is contained in:
parent
3be601734e
commit
33eb4d6ebb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400416
@ -1078,6 +1078,7 @@
|
||||
SUBDIR += vinetto
|
||||
SUBDIR += vlock
|
||||
SUBDIR += vlog
|
||||
SUBDIR += vm-to-tor
|
||||
SUBDIR += vnccrack
|
||||
SUBDIR += vpnc
|
||||
SUBDIR += vuxml
|
||||
|
49
security/vm-to-tor/Makefile
Normal file
49
security/vm-to-tor/Makefile
Normal file
@ -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>
|
2
security/vm-to-tor/distinfo
Normal file
2
security/vm-to-tor/distinfo
Normal file
@ -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
|
42
security/vm-to-tor/files/pkg-message.in
Normal file
42
security/vm-to-tor/files/pkg-message.in
Normal file
@ -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.
|
||||
======================================================================
|
4
security/vm-to-tor/pkg-descr
Normal file
4
security/vm-to-tor/pkg-descr
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user