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

در اینجا، مشابه به سیستم فری‌بی‌اس‌دی خواهد بود و ما از HTTPS برای واکشی بسته های خود و به روز رسانی استفاده خواهیم کرد - ما به یک بسته اضافی برای کمک به خود نیاز داریم (ca_root_nss).

نصب بسته ca_root_nss:

# pkg install ca_root_nss

برای نصب های تازه، فایل /usr/local/etc/pkg/repos/df-latest.conf.sample در /usr/local/etc/pkg/repos/df-latest کپی می شود. فایل هایی که آخر آن ها ".sample"می باشد در نظر گرفته نمی شوند; pkg(8) تنها فایل های "conf." را می خواند.

دراگون‌فلای بی‌اس‌دی دو مخزن بسته دارد:

  • آوالون (mirror-master.dragonflybsd.org);
  • ولف‌پاند (pkg.wolfpond.org).

می توانید نشانی اینترنتی استفاده شده را برای اشاره به مخازن روی /usr/local/etc/pkg/repos/df-latest ویرایش کنید و تنها مجاز به همین کار هستید! یادتان باشد تا برای آوالون از pkg+https:// استفاده کنید.

پس از پیاده کردن تمام این تغییرات، لیست بسته ها را مجدد به روز رسانی می کنیم و سعی می کنیم بررسی کنیم که آیا یک به روز رسانی جدید وجود دارد یا نه:

# pkg update -f
# pkg upgrade -y -f

3. Package installation

بسته tor را نصب کنید:

# pkg install tor

... یا نصب یک انتشار آلفا:

# 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

اینجا ما tor را تنظیم می کنیم تا در هنگام بوت آغاز شود و از setuid استفاده کند برای اینکه به درگاه های پایین تر مانند 443 مقید شود (خود دیمن به صورت یک کاربر فاقد حق ویژه عادی اجرا خواهد شد) .

# echo "tor_setuid=YES" >> /etc/rc.conf
# echo "tor_enable=YES" >> /etc/rc.conf
# service tor start

6. نکات پایانی

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.