Support #734
Install a TOR Proxy Server on FreeBSD
Status:
Closed
Priority:
Normal
Assignee:
Category:
The Onion Router (TOR)
Target version:
Description
This is a guide for setting up a TOR connection with a SOCKS5 proxy server on FreeBSD.
Prepare the Environment¶
- Make sure the system is up to date:
pkg update && pkg upgrade
Install OpenNTPD¶
- Install OpenNTPD:
pkg install openntpd
- Edit the OpenNTPD config file:
vi /usr/local/etc/ntpd.conf
- And add a couple more ntp sources for good measure:
servers pool.ntp.org servers clock.via.net servers clock.isc.org
- And add a couple more ntp sources for good measure:
- Start and enable OpenNTPD at boot:
echo 'openntpd_enable="YES"' >> /etc/rc.conf service openntpd start
NOTE: An NTP server in a jail will fail to start. Jails get their time from the host system, make to install the NTP server on the host.
Install TOR¶
- Install TOR:
pkg install tor
- Tor users are strongly advised to prevent traffic analysis that exploits sequential IP IDs by setting:
sysctl net.inet.ip.random_id=1
- Edit the TOR config file:
vi /usr/local/etc/tor/torrc
- And add/modify the following lines:
RunAsDaemon1
- And add/modify the following lines:
- Start and enable TOR at boot:
echo 'tor_enable="YES"' >> /etc/rc.conf service tor start
- Monitor the status of the TOR connection:
tail /var/log/tor
- Truncated output:
... May 03 16:12:44.000 [notice] Bootstrapped 50%: Loading relay descriptors May 03 16:12:53.000 [notice] Bootstrapped 57%: Loading relay descriptors May 03 16:12:56.000 [notice] Bootstrapped 64%: Loading relay descriptors May 03 16:12:57.000 [notice] Bootstrapped 69%: Loading relay descriptors May 03 16:12:58.000 [notice] Bootstrapped 78%: Loading relay descriptors May 03 16:12:59.000 [notice] Bootstrapped 80%: Connecting to the Tor network May 03 16:12:59.000 [notice] Bootstrapped 90%: Establishing a Tor circuit May 03 16:13:00.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working. May 03 16:13:00.000 [notice] Bootstrapped 100%: Done
- Truncated output:
Install Privoxy¶
- Install privoxy:
pkg install privoxy
- Create the privoxy running directory:
mkdir /var/run/privoxy chown privoxy:privoxy /var/run/privoxy
- Edit the config file to use Privoxy with Tor.
vi /usr/local/etc/privoxy/config
- And modify the following lines:
# Set the listen address to 127.0.0.1:8118 listen-address 127.0.0.1:8118 # forward privoxy to TOR forward-socks4a / 127.0.0.1:9050 .
- And modify the following lines:
- Start and enable privoxy at boot:
echo 'privoxy_enable="YES"' >> /etc/rc.conf service privoxy start
Resources¶
Updated by Daniel Curtis almost 9 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
Updated by Daniel Curtis almost 9 years ago
- Description updated (diff)
- Status changed from In Progress to Resolved
- % Done changed from 30 to 100
Updated by Daniel Curtis almost 9 years ago
- Subject changed from Install a TOR Proxy Server to Install a TOR Proxy Server on FreeBSD