projects:howtos:tor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
projects:howtos:tor [2013/05/12 20:26] – created prometheusprojects:howtos:tor [2015/07/15 21:54] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 ===== A Pi a day, keeps censorship away ===== ===== A Pi a day, keeps censorship away =====
 +
 +You would like to support human rights? Then please follow the how-to.
 +
 +**Note:** We assume you have a new working [[https://archlinux.org/|Arch Linux]] running on your [[https://raspberrypi.org/|RaspberryPi]].
  
 ===== Installation ===== ===== Installation =====
  
 +First we have to install all the packages which are needed & useful to us.
  
 <sxh bash;> <sxh bash;>
- 
 root@pi# pacman -Syyu root@pi# pacman -Syyu
 root@pi# pacman -S base-devel vim tor ntp tor vnstat sudo root@pi# pacman -S base-devel vim tor ntp tor vnstat sudo
 +</sxh>
 +
 +After that we should create us an own user account with sudo privileges.
 +
 +<sxh bash;>
 root@pi# useradd -m -s /bin/bash YOUR_USERNAME root@pi# useradd -m -s /bin/bash YOUR_USERNAME
 root@pi# vimsudo /etc/sudoers root@pi# vimsudo /etc/sudoers
 ... ...
 +</sxh>
 +
 +Now, we install [[https://aur.archlinux.org/packages/yaourt/|yaourt]] in order to fetch and install packages from the AUR.
 +
 +<sxh bash;>
 root@pi# su YOUR_USERNAME root@pi# su YOUR_USERNAME
 root@pi# wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz root@pi# wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
Line 20: Line 34:
 root@pi# cd ~/ root@pi# cd ~/
 root@pi# rm -r yaourt* root@pi# rm -r yaourt*
-root@pi# cd /etc/tor/ +root@pi# yaourt -Syua 
-root@pi# mv torrc torrc.original +root@pi# yaourt -S arm 
-root@pi# vim torrc +</sxh> 
-...+ 
 +In order to integrate tor into systemd, we need to write a -n own service file, which ensures fast, easy usage and the guarantuee that at every boot tor will be started along
 + 
 +<sxh bash;>
 root@pi# cd /etc/systemd/system root@pi# cd /etc/systemd/system
 root@pi# vim tor.service root@pi# vim tor.service
-...+</sxh> 
 + 
 + 
 +<sxh bash; title: systemd service file - /etc/systemd/system/tor.service> 
 +[Unit] 
 +Description=Starting Tor Service 
 + 
 +[Service] 
 +ExecStart=/usr/bin/tor -f /etc/tor/torrc 
 +  
 +[Install] 
 +After=multi-user.target 
 +</sxh> 
 + 
 +<sxh bash;>
 root@pi# vim ntp-once.service root@pi# vim ntp-once.service
-... 
 </sxh> </sxh>
 +
 +<sxh plain; title:>
 +
 +</sxh>
 +
 +===== Configuration =====
 +
 +After this, we finally attack the most important part: Tor configuration.
 +
 +<sxh bash;>
 +root@pi# cd /etc/tor/
 +root@pi# mv torrc torrc.original
 +root@pi# vim torrc
 +</sxh>
 +
 +<sxh plain; title: /etc/tor/torrc>
 +ORPort 443
 + 
 +Log notice file /var/log/tor/notices.log
 + 
 +RelayBandwidthRate 100 KB  # Throttle traffic to 100KB/s (800Kbps)
 +RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
 +
 +#AccountingStart day 00:00
 +#AccountingMax 8 GB
 + 
 +SocksPort 0
 +BridgeRelay 1
 +Exitpolicy reject *:*
 +</sxh>
 +
 +===== Up & Run! =====
 +
 +Either type:
 +
 +<sxh bash;>
 +root@pi# systemctl start tor
 +</sxh>
 +
 +or simply boot up your device.
 +
 +===== References =====
 +
 +  * [[http://throwww.com/a/1ze|Routing 150GB Tor traffic though a Raspberry Pi]]
 +  * [[http://patrakov.blogspot.com/2011/01/writing-systemd-service-files.html|My Blog -Writing systemd service files]]
 +  * https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ#HowcanIlimitthetotalamountofbandwidthusedbymyTorrelay
 +  * https://library.linode.com/securing-your-server#sph_creating-a-firewall
 +  * https://www.torservers.net/wiki/setup/obfsproxy?s[]=torrc
 +
 +===== Conclusion =====
  • projects/howtos/tor.1368383189.txt.gz
  • Last modified: 2015/07/15 21:54
  • (external edit)