2008年11月17日 星期一

Set up a Tor relay node on Ubuntu

1. verify that your clock is set correctly

2. install tor

sudo apt-get install tor

3. make sure to define at least Nickname and the listening port, ORPort

sudo vi /etc/tor/torrc

--
.
.
SocksPort 9050 # what port to open for local application connections
SocksListenAddress 127.0.0.1 # accept connections only from localhost
.
Nickname ididnteditheconfig
.
RelayBandwidthRate 20 KBytes # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 40 KBytes # But allow bursts up to 200KB/s (1600Kbps)
.
ORPort 9001
.
.

5. restart tor to reload config

sudo /etc/init.d/tor restart

4. add this line to privoxy configuration file /etc/privoxy/config

forward-socks4a / localhost:9050 .

it means tor listens socks4a on port 9050
In the SOCKS 4A protocol, the DNS resolution of the target hostname happens on the SOCKS server, while in SOCKS 4 it happens locally.

5. according the default setting in /etc/privoxy/config

listen-address 127.0.0.1:8118

port 8118 should be used as http proxy

6. when your browser is set with privoxy proxy, you can check this website to verify

https://torcheck.xenobite.eu/


7. when you check log file, /var/log/tor/log
you may notice the warning message

MMM ddd hh:mm:ss.xxx [warn] Your application (using socks4 to port 80) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead. For more information, please see http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#SOCKSAndDNS.

沒有留言: