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. Configure Tor Project's Repository
Configuring the Tor Project's Repository for Fedora consists basically on setting up /etc/yum.repos.d/Tor.repo
with the following content:
[tor]
name=Tor for Fedora $releasever - $basearch
baseurl=https://rpm.torproject.org/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://rpm.torproject.org/fedora/public_gpg.key
cost=100
More information about it can be found here.
3. Install tor
Once you are set configuring the Tor repository, you are now able to install the package:
# dnf install tor
4. Install obfs4proxy
We are opting here to install and use obfs4
as pluggable transport, so we are going to install obfs4proxy
.
Different from other Linux distributions, Fedora offers a binary package we can use. It's available since Fedora 33.
The package is called obfs4
and this is all you need to install it:
# dnf install obfs4
For more information about installing or building obfs4proxy
from source, please refer to its official docummentation.
5. Edit your Tor config file, usually located at /etc/tor/torrc
and replace its content with:
RunAsDaemon 1
BridgeRelay 1
# "TODO1" را با درگاه تور انتخابی خود جایگزین کنید. این باید به صورت خارجی
# قابل دسترس باشد. از استفاده از درگاه 9001 اجتناب کنید چون معمولاً با تور
# , مرتبط است و سانسور کنندگان اینترنت را برای این درگاه اسکن می کنند.
ORPort TODO1
ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy
# "TODO2" را با درگاه obfs4 انتخابی خود جایگزین کنید. این درگاه باید
# از خارج قابل دسترس باشد و از درگاه مشخص شده برای ORPort باید تفاوت داشته باشد.
# از درگاه 9001 اجتناب کنید چون به صورت رایج با
# تور مرتبط است و سانسور کنندگان ممکن است اینترنت را برای این درگاه اسکن کنند.
ServerTransportListenAddr obfs4 0.0.0.0:TODO2
# درگاه ارتباط محلی بین تور و obfs4. همیشه این را روی "auto" تنظیم کنید.
# "Ext" به معنای "تعمیم یافته" است نه "خارجی". یک شماره درگاه خاص
# را مشخص نکنید یا روی 0.0.0.0 شنود نکنید.
ExtORPort auto
# نشانی ایمیل خود را با "<address@email.com>" تغییر دهید تا بتوانیم در صورت نیاز با شما ارتباط برقرار کنیم
# پل شما مشکلاتی دارد. این انتخابی می باشد ولی توصیه می شود.
اطلاعات مخاطب <address@email.com>
# یک نام مستعار برای پل خود انتخاب کنید. این به اختیار شما می باشد.
Nickname PickANickname
فراموش نکنید تا گزینه های ORPort
, ServerTransportListenAddr
, ContactInfo
, و Nickname
را تغییر دهید.
- Note that both Tor's OR port and its obfs4 port must be reachable. If your bridge is behind a firewall or NAT, make sure to open both ports. You can use our reachability test to see if your obfs4 port is reachable from the Internet.
5. Restart Tor
# systemctl enable --now tor
6. Monitor your logs
برای تایید اینکه پل شما بدون هیچ مشکلی اجرا می شود، باید چیزی شبیه به این ببینید (معمولاً در /var/log/tor/log
یا /var/log/syslog
):
[اعلان] اثر انگشت کلید هویت سرور تور شما '<NICKNAME><FINGERPRINT>' می باشد
[اعلان] اثرانگشت کلید هویت هش شده پل تور شما '<NICKNAME><HASHED FINGERPRINT>' می باشد
[اعلان] انتقال سرور ثبت شده 'obfs4' در '[::]:46396'
[اعلان] تور با موفقیت یک زنجیره را باز کرده است. به نظر می آید که عملکرد کلاینت مشکلی ندارد.
[اعلان] بوت استرپ 100%: تمام
[اعلان] بررسی قابل دسترس بودن <redacted>:3818 ORPORT... (این ممکن است تا 20 دقیقه طول بکشد -- به دنبال پیام های لاگ که نشان می دهند عملیات موفق بوده باشید)
[اعلان] خود آزمایی نشان می دهد که ORPort از بیرون قابل دسترس است. عالی.انتشار توصیفگر سرور.
7. Final Notes
If you are having trouble setting up your bridge, have a look at our help section. If your bridge is now running, check out the post-install notes.