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. עינו בהוראות כדי לשפעל automatic software updates למערכת ההפעלה שלכם.
2. Bootstrap pkg
This article assumes we have already a base installation of FreeBSD running, and only the base system (here, we are running 12.2-RELEASE).
משמעו של דבר שאין לנו אף חבילת תוכנה שהותקנה, או אפילו מנהל תוכנות ה pkg
בעצמו ( sudo
אינו זמין - אנו מריצים פקודות כבסיס - root).
להתחיל ולהתקין pkg
עלינו להריץ את הפקודה הבאה:
# pkg bootstrap
# pkg update -f
2.1. Recommended Steps to Setup pkg
כדי לעקוב אחר העדכונים העתידיים באופן "מהיר יותר" אנו ממליצים לשנות את 'quarterly' branch שבשימוש pkg
ל 'latest' branch.
צעד אחד נוסף הנו להעדיף את השימוש ב HTTPS כדי להעלות את התוכנות והעדכונים שלנו ולכן אנו צריכים תוכנה נוספת שתעזור לנו בכך (ca_root_nss).
התקנת תוכנת ca_root_nss
package:
# pkg install ca_root_nss
אנו שומרים את ההגדרות המקוריות שבשימוש pkg
אך מגדירים אחרות אשר ידרסו אותן.
אז אנו מגדירים ספריה חדשה, ואז יוצרים קובץ הגדרות כדי שיחליף, לפי מה שאנו צריכים.
קובץ ההגדרות יהיה /usr/local/etc/pkg/repos/FreeBSD.conf
.
יצירת ספריה חדשה
# mkdir -p /usr/local/etc/pkg/repos
כך צריך להראות קובץ ההגדרות החדש /usr/local/etc/pkg/repos/FreeBSD.conf
:
FreeBSD: {
url: pkg+https://pkg.freebsd.org/${ABI}/latest
}
לאחר שמיישמים את כל השינויים האלה, אנו מעדכנים את רשימת התוכנות שוב ומנסים לבדוק אם אם יש כבר עדכון חדש ליישם:
# pkg update -f
# pkg upgrade -y -f
3. Package installation
Install tor
FreeBSD's package.
כאן אנו יכולים לבחור להתקין את הגירסה היציבה האחרונה, כגון:
# pkg install tor
... או להתקין גירסת אלפא:
# pkg install tor-devel
4. Configuration file
הציבו את קובץ ההגדרות /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. Enable net.inet.ip.random_id
# echo "net.inet.ip.random_id=1" >> /etc/sysctl.conf
# sysctl net.inet.ip.random_id=1
6. Start the service
כאן אנו מגדירים את tor
להתחיל בעת הפעלת המחשב ומחברים אותו לערוץ נמוך כגון 443 (ה daemon עצמו עדיין ירוץ כמשתמש ללא פריבילגויות).
# sysrc tor_setuid=YES
# sysrc tor_enable=YES
# service tor start
7. Final Notes
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.