Search This Blog

Saturday, September 12, 2009

OpenSource, Tor in FreeBSD

How does it work?
Firefox -> Privoxy (localhost:8118) -> Tor (localhsot:9050)

Install Tor and Privoxy through FreeBSD port
/usr/ports/security/tor (or /usr/ports/security/tor-devel)
/usr/ports/www/privoxy

In /etc/rc.conf:
tor_enable="YES" #this seems to for running Tor server only
privoxy_enable="YES"

Configure privoxy:
/usr/local/etc/privoxy/config
add, forward-socks4a / 127.0.0.1:9050 .
to the config file, note . at the end
(start privoxy, /usr/local/etc/rc.d/privoxy forcestart)
Check your privoxy log, if there is any error:
/var/log/privoxy/logfile
You might need to create an action file, standard.action, in /usr/local/etc/privoxy
(you can copy the default.action)


To enable the tor server, set tor_enable="YES" in your /etc/rc.conf
and edit /usr/local/etc/tor/torrc. Also note that the rc.subr script overrides
many torrc options and is tunable. See /usr/local/etc/rc.d/tor for details.

Check if Privoxy is listening, type:
netstat -a | grep 8118
tcp4 0 0 localhost.8118 *.* LISTEN
(or you can try
sockstat -4
, and see if privoxy is there)

Check if Tor is listening, type:
netstat -a | grep 9050
and you should see:
tcp4 0 0 localhost.9050 *.* LISTEN

If Tor is not running, simply run it, type in the command line:
tor

For Firefox, install TorButton add-on.

To ask other applications (supporting http proxy) to use Tor, you can point them to Privoxy (that is localhost port 8118). Or you can ask the application directly to use socks5, port 9050

Check if your Tor is working here: (also contains link for FAQ)
https://check.torproject.org/

No comments: