How to make the perfect TOR VM in VirtualBox
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

install.sh 1.5KB

5年前
5年前
5年前
5年前
5年前
5年前
5年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/sh
  2. echo "Installing required packages"
  3. apt-get --assume-yes install \
  4. build-essential \
  5. linux-headers-amd64 \
  6. iptables-persistent \
  7. gdm3 \
  8. vlc \
  9. firefox-esr \
  10. transmission \
  11. enlightenment \
  12. redsocks \
  13. tor \
  14. rsync \
  15. unbound \
  16. vim-tiny
  17. echo "Removing unused packages"
  18. apt-get --assume-yes remove --purge nano
  19. echo "Mounting VirtualBox VM guest additions CD..."
  20. mount /dev/cdrom /mnt
  21. echo "Compiling VM additions..."
  22. for i in `cd /mnt && ./VBoxLinuxAdditions.run`; do echo -n "."; done
  23. echo " Done"
  24. echo "Unmounting CD..."
  25. cd -
  26. umount /mnt
  27. echo "Copying static configs"
  28. cd static && rsync -av . /
  29. echo "Disabling IPv6"
  30. echo net.ipv6.conf.all.disable_ipv6=1 >> /etc/sysctl.conf
  31. echo net.ipv6.conf.default.disable_ipv6=1 >> /etc/sysctl.conf
  32. for INSTUSER in `cd /home && ls -d *`
  33. do
  34. echo "Installing non-root setup for $INSTUSER"
  35. cp -R user/* /home/${INSTUSER}/
  36. chown -R ${INSTUSER}:${INSTUSER} /home/${INSTUSER}/
  37. echo "Disable bash_history for user ${INSTUSER}"
  38. rm -f /home/${INSTUSER}/.bash_history
  39. ln -s /dev/null /home/${INSTUSER}/.bash_history
  40. done
  41. echo "Disable bash_history for root"
  42. rm -f /root/.bash_history
  43. ln -s /dev/null /root/.bash_history
  44. echo "Cleaning apt/pkg"
  45. apt-get clean
  46. echo "Cleaning syslog"
  47. /etc/init.d/rsyslog stop
  48. find /var/log -type f -print0 | xargs -0 rm
  49. echo "Removing installer script, git package and dependencies"
  50. cd ..
  51. rm -rf torvm
  52. apt-get --assume-yes remove --purge git
  53. apt-get --assume-yes autoremove --purge
  54. echo "Setup complete, please reboot to make it active"