How to make the perfect TOR VM in VirtualBox
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

install.sh 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/sh
  2. echo "Installing required packages"
  3. for i in `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. do
  18. echo -n .
  19. done
  20. echo " Done"
  21. echo "Removing unused packages"
  22. for i in `apt-get --assume-yes remove --purge nano`; do echo -n "."; done
  23. echo " Done"
  24. echo "Mounting VirtualBox VM guest additions CD..."
  25. mount /dev/cdrom /mnt
  26. echo "Compiling VM additions..."
  27. for i in `cd /mnt && ./VBoxLinuxAdditions.run`; do echo -n "."; done
  28. echo " Done"
  29. echo "Unmounting CD..."
  30. cd -
  31. umount /mnt
  32. echo "Copying static configs"
  33. cd static && rsync -av . /
  34. echo "Disabling IPv6"
  35. echo net.ipv6.conf.all.disable_ipv6=1 >> /etc/sysctl.conf
  36. echo net.ipv6.conf.default.disable_ipv6=1 >> /etc/sysctl.conf
  37. for INSTUSER in `cd /home && ls -d *`
  38. do
  39. echo "Installing non-root setup for $INSTUSER"
  40. cp -R user/* /home/${INSTUSER}/
  41. chown -R ${INSTUSER}:${INSTUSER} /home/${INSTUSER}/
  42. echo "Disable bash_history for user ${INSTUSER}"
  43. rm -f /home/${INSTUSER}/.bash_history
  44. ln -s /dev/null /home/${INSTUSER}/.bash_history
  45. done
  46. echo "Disable bash_history for root"
  47. rm -f /root/.bash_history
  48. ln -s /dev/null /root/.bash_history
  49. echo "Cleaning apt/pkg"
  50. apt-get clean
  51. echo "Cleaning syslog"
  52. /etc/init.d/rsyslog stop
  53. find /var/log -type f -print0 | xargs -0 rm
  54. echo "Setup complete, please reboot to make it active"