diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-08-02 15:50:37 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-08-02 15:50:37 -0300 |
commit | b15e5d8b23b9d8d369be289d0126275f25f1e1eb (patch) | |
tree | f67c1e896abb6467208c1d743ecfce1d392fe3b2 /share/trashman/tor-relay | |
parent | 84371b173b701e1ac0687b80d8187763b1610596 (diff) | |
download | trashman-b15e5d8b23b9d8d369be289d0126275f25f1e1eb.tar.gz trashman-b15e5d8b23b9d8d369be289d0126275f25f1e1eb.tar.bz2 |
Adds OpenBSD autoupgrade and tor-relay recipes thanks to a contribution
Diffstat (limited to 'share/trashman/tor-relay')
-rw-r--r-- | share/trashman/tor-relay/info | 1 | ||||
-rwxr-xr-x | share/trashman/tor-relay/unix/openbsd/install | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/share/trashman/tor-relay/info b/share/trashman/tor-relay/info new file mode 100644 index 0000000..b89fc0f --- /dev/null +++ b/share/trashman/tor-relay/info @@ -0,0 +1 @@ +tor daemon configured as a relay diff --git a/share/trashman/tor-relay/unix/openbsd/install b/share/trashman/tor-relay/unix/openbsd/install new file mode 100755 index 0000000..0455300 --- /dev/null +++ b/share/trashman/tor-relay/unix/openbsd/install @@ -0,0 +1,35 @@ +#!/usr/bin/env sh +# +# Configure a tor daemon system-wide. +# + +# Firewall config +echo set limit states = 100000 >> /etc/pf.conf +echo pass in log on egress proto tcp from any to any port { 9001 9030 } >> /etc/pf.conf +echo pass out log on egress proto tcp from any to any port { 9001 9030 } >> /etc/pf.conf + +# Apply firewall rules +pfctl -f /etc/pf.conf + +# Set +echo https://ftp.openbsd.org >> /etc/installurl + +# Install Tor +pkg_add -vv tor + +# Configure Tor +echo SOCKSPort 0 >> /etc/tor/torrc +echo ORPort 9001 >> /etc/tor/torrc +echo Nickname Baiacu >> /etc/tor/torrc +echo Exitrelay 0 >> /etc/tor/torrc +echo DirPort 9030 >> /etc/tor/torrc + +# Sysctl config +echo kern.maxfiles=20000 >> /etc/sysctl.conf + +# Login config +echo -e "tor:\/n:openfiles-max=8192:\ :tc=daemon:" >> /etc/login.conf + +# Run Tor +rcctl enable tor +rcctl start tor |