xorl %eax, %eax

Debian + TOR: auto-installation shell script

leave a comment »

I was about to install TOR + Privoxy on some of my home boxes that have debian and I wrote a tiny shell script that automates this process. In addition, it adds two iptables rules that restrict access to the SOCKS as well as TOR services for any packets not coming from localhost (interface lo). Here is the script:


echo "deb  http://mirror.noreply.org/pub/tor etch main" >> /etc/apt/sources.list
echo "deb-src  http://mirror.noreply.org/pub/tor etch main" >> /etc/apt/sources.list

apt-get -q update
apt-get -q -y --force-yes install tor privoxy

echo "forward-socks4a / ." >> /etc/privoxy/config
/etc/init.d/tor start
/etc/init.d/privoxy start

iptables -A INPUT -p tcp -i ! lo --dport 8118 -j DROP
iptables -A INPUT -p tcp -i ! lo --dport 9050 -j DROP

I hope you find it useful! Oh.. as you can see from the sources.list it is written for stable (etch) Debian releases. Just run it and your TOR will be up and running :)

Written by xorl

February 3, 2009 at 23:12

Posted in administration, linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s