Project

General

Profile

Support #734

Install a TOR Proxy Server on FreeBSD

Added by Daniel Curtis over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
The Onion Router (TOR)
Target version:
Start date:
01/24/2016
Due date:
% Done:

100%

Estimated time:
1.00 h
Spent time:

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
      
  • 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
      
  • 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
      

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 .
      
  • Start and enable privoxy at boot:
    echo 'privoxy_enable="YES"' >> /etc/rc.conf
    service privoxy start
    

Resources

History

#1 Updated by Daniel Curtis over 4 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

#2 Updated by Daniel Curtis over 4 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved
  • % Done changed from 30 to 100

#3 Updated by Daniel Curtis over 4 years ago

  • Status changed from Resolved to Closed

#4 Updated by Daniel Curtis over 4 years ago

  • Subject changed from Install a TOR Proxy Server to Install a TOR Proxy Server on FreeBSD

Also available in: Atom PDF