1. Enable Automatic Software Updates
One of the most important things to keep your relay secure is to install security updates timely and ideally automatically so you can not forget about it. Follow the instructions to enable automatic software updates for your operating system.
2. Bootstrap pkg
DragonFlyBSD's daily snapshots and releases (starting with 3.4) come with pkg
already installed. Upgrades from earlier releases, however, will not have it. If pkg
is missing on the system for any reason, it can be quickly bootstrapped without having to build it from source or even having DPorts installed:
# cd /usr
# make pkg-bootstrap
# rehash
# pkg-static install -y pkg
# rehash
2.1. Recommended Steps to Setup pkg
Aici, modul de lucru este similar cu cel de pe un sistem FreeBSD și vom folosi HTTPS pentru a obține pachetele și actualizările noastre - așa că aici avem nevoie de un pachet suplimentar care să ne ajute (ca_root_nss
).
Instalarea pachetului ca_root_nss
:
# pkg install ca_root_nss
Pentru instalații noi, fișierul /usr/local/etc/pkg/repos/df-latest.conf.sample
este copiat în/usr/local/etc/pkg/repos/df-latest
. Fișierele care se termină în extensia ".sample" sunt ignorate; pkg (8) citește doar fișierele care se termină în ".conf" și le va citi pe toate, atâtea câte găsește.
DragonflyBSD are 2 depozite de pachete:
- Avalon (mirror-master.dragonflybsd.org);
- Wolfpond (pkg.wolfpond.org).
Putem pur și simplu edita URL folosit pentru a evidenția depozitele de pe /usr/local/etc/pkg/repos/df-latest
și asta este tot! Nu uitați să folosiți pkg+https:// pentru Avalon.
După aplicarea tuturor acestor modificări, actualizăm din nou lista de pachete și încercăm să verificăm dacă există deja o nouă actualizare de aplicat:
# pkg update -f
# pkg upgrade -y -f
3. Package installation
Instalați pachetul tor
:
# pkg install tor
... sau să instalați o versiune alfa:
# pkg install tor-devel
4. Configuration file
Put the configuration file /usr/local/etc/tor/torrc
in place
Nickname myNiceRelay # Change "myNiceRelay" to something you like
ContactInfo your@e-mail # Write your e-mail and be aware it will be published
ORPort 443 # You might use a different port, should you want to
ExitRelay 0
SocksPort 0
Log notice syslog
5. Start the service
Aici am setat tor
ca să pornească la momentul de boot și vom folosi funcția setuid, pentru a ne conecta la porturile inferioare precum 443 (daemon în sine va rula totuși ca un utilizator obișnuit, fără privilegii).
# echo "tor_setuid=YES" >> /etc/rc.conf
# echo "tor_enable=YES" >> /etc/rc.conf
# service tor start
6. Note finale
If you are having trouble setting up your relay, have a look at our help section. If your relay is now running, check out the post-install notes.