Skip to content

Create TOR hidden service with apache / mac sierra 10.12.2

Notifications You must be signed in to change notification settings

zyliutw/Tor_Hidden_Service_Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 

Repository files navigation

Tor-Hidden-Service-Setup

Environment

OS : MacOSX Sierra 10.12.2
Apache : 2.4.23

Step

Install MacPort

  Download the MacPort.pkg
  From https://github.com/macports/macports-base/releases/download/v2.4.0/MacPorts-2.4.0-10.12-Sierra.pkg
  
  Install , it may install under /opt/local/bin/

Install tor

  sudo port install tor

Make a directory, use to store sk, onion url

  cd /Users/{Your-home-name}
  mkdir hidden-service
  sudo chmod 700 hidden-service  # You can't give the folder too permissive

Modify the torrc

After install tor
/usr/local/ect/tor/ has torrc.sample
Modify it!

  sudo cp torrc.sample torrc
  sudo vim torrc

Insert the following to torrc

  SocksPort 9050 # You have to open this port!
  SockListenAddress 127.0.0.1
  HiddenServiceDir /Users/{Your-home-name}/hidden-service/  # Absolute path
  HiddenServicePort 80 127.0.0.1:80   # first port : for tor,  second port : for your server

Modify the httpd

  sudo vim /etc/apache2/httpd.conf
  
  ServerName {your onion address} 
  # ex : jn4nshpywumoda7s.onion:80
  

Open the port( if necessary)

  sudo vim /etc/pf.conf
  Insert following
       pass in proto tcp from any to any port 9050 # open port 9050
  
  sudo pfctl -vnf /ect/pf.conf

Run tor

  Use console, run tor
  
  It will generate the private key file and onion url file
  in the hidden-service/

Run Apache

  sudo apachectl start

Open tor browser

  Connect to the onion url in the hidden-service/hostname/

Reference

  1. https://www.torproject.org/docs/tor-hidden-service.html.en
  2. https://github.com/whackashoe/tor-hidden-service-setup/blob/master/setting-up-webserver.md
  3. https://rolfje.wordpress.com/2014/05/10/open-a-port-in-osx-mavericks-firewall/

About

Create TOR hidden service with apache / mac sierra 10.12.2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published