Update pivilion manual setup

v3d 2018-04-19 23:15:49 +00:00
parent 727138898d
commit 315b5be35f

@ -155,46 +155,11 @@ Dnsmasq is a Domain Name System (DNS) forwarder and Dynamic Host Configuration P
`sudo apt install tor`
You can now choose to either pull the Pivilion scripts and Tor / Rpi configuration (if so skip to [here](#cloning-pivilion-settings-and-scripts-via-git)) from our Gitlab or make the next step manually and make your own Tor hidden service without Pivilion.
### Configure Tor
If you are just pulling the default Pivilion configuration from git skip to [here](#cloning-pivilion-settings-and-scripts-via-git)!
Edit Tor's configuration file /etc/tor/torrc by issuing
`sudo nano /etc/tor/torrc`
Uncomment RunAsDeamon 1
In the section intended for hidden services only, uncomment (remove the leading # (hash) symbol) the two lines
HiddenServiceDir /var/lib/tor/hidden_service
HiddenServicePort 80 127.0.0.1:80
In order to setup additional services, simply add their port's to this list, followed by your localhost IP (always 127.0.0.1). Eg. for SSH via Tor we would add
HiddenServicePort 22 127.0.0.1:22
Note that hidden service ports don't need to be the same as their local ports. It is reccomended to run services on high ports (1024-65535) for (not much) added security. The port for the http service is left at the default port 80, because otherwise we need to input the port in the URL, i.e. 7j4kxhmso6yhz2df.onion:1337 tp access the website on port 1337.
Write your changes to the file with Ctrl + O. Exit nano with Ctrl + X.
Now restart tor
`sudo systemctl restart tor`
Tor will generate a hostname. to view your hostname run
`sudo cat /var/lib/tor/hidden_service/hostname`
Check if your hidden service works by opening Tor Browser and navigating to your onion domain.
You should see the same lighttpd placeholder page as before.
You can now choose to either pull the Pivilion scripts and Tor / Rpi configuration or make the next step [manually](#configuring-tor) and make your own custom Tor hidden service.
## Cloning Pivilion settings and scripts via Git
Our script assumes that your user is named pi. It will create direcotries in pi's home dir (/home/pi) and use scripts that reference that directory.
We assume that your user is named pi. It will create direcotries in pi's home dir (/home/pi) and use scripts that reference that directory.
Make sure you are root before doing these steps. The root account is disabled on Raspbian, so you will have to become root using by issuing
@ -250,6 +215,40 @@ You should now edit the hostapd config file by issuing
Change the wifi ssid (if you like) - the password should definitely be changed!
## Configuring Tor
Edit Tor's configuration file /etc/tor/torrc by issuing
`sudo nano /etc/tor/torrc`
Uncomment RunAsDeamon 1
In the section intended for hidden services only, uncomment (remove the leading # (hash) symbol) the two lines
HiddenServiceDir /var/lib/tor/hidden_service
HiddenServicePort 80 127.0.0.1:80
In order to setup additional services, simply add their port's to this list, followed by your localhost IP (always 127.0.0.1). Eg. for SSH via Tor we would add
HiddenServicePort 22 127.0.0.1:22
Note that hidden service ports don't need to be the same as their local ports. It is reccomended to run services on high ports (1024-65535) for (not much) added security. The port for the http service is left at the default port 80, because otherwise we need to input the port in the URL, i.e. 7j4kxhmso6yhz2df.onion:1337 tp access the website on port 1337.
Write your changes to the file with Ctrl + O. Exit nano with Ctrl + X.
Now restart tor
`sudo systemctl restart tor`
Tor will generate a hostname. to view your hostname run
`sudo cat /var/lib/tor/hidden_service/hostname`
Check if your hidden service works by opening Tor Browser and navigating to your onion domain.
You should see the same lighttpd placeholder page as before.
That's it - everything should be working now!
You now have four commands at your disposal.
@ -257,6 +256,7 @@ You now have four commands at your disposal.
All these commands are bash scripts located in the /usr/local/bin directory.
1. "pivilion" will display some info and a brief tutorial. It will also copy some files to proper positions.
1. "onion" will set your Pi to start in onion mode on next reboot. This is the default mode.
In this mode your Rpi
1. "hotspot" will set your Pi to start in hotspot mode on next reboot.
Please remember to set the mode properly before each reboot or you might have to access your Pi via ethernet cable or screen.
1. "pikey" is used to setup a Wifi network and password to be used in onion mode.