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 package repository for Debian/Ubuntu is recommended and documented on Support portal. Please follow those instructions before proceeding.

Note: Ubuntu users need to get Tor from the Tor Project's repository.

3. Install Tor

Ensure you update the packages database before installing the package, than call apt to install it:

# apt update
# apt install tor

4. Install obfs4proxy

On Debian, the obfs4proxy package is available in unstable, testing, and stable. On Ubuntu, bionic, cosmic, disco, eoan, and focal have the package. If you're running any of them, sudo apt-get install obfs4proxy should work.

თუ არა, შეგიძლიათ ააწყოთ პირდაპირ წყაროდან.

5. Edit your Tor config file, usually located at /etc/tor/torrc and replace its content with:

BridgeRelay 1

# შეცვალეთ „TODO1“ სასურველი Tor-პორტით.
# ეს პორტი გარედან მისაწვდომი უნდა იყოს.
# აირიდეთ 9001 ვინაიდან, მეტად გაიგივებულია Tor-თან და ცენზორებმა შეიძლება გადაამოწმონ ინტერნეტიდან ეს პორტი.
ORPort TODO1

ServerTransportPlugin obfs4 exec /usr/bin/obfs4proxy

# შეცვალეთ „TODO2“ სასურველი obfs4-პორტით.
# ეს პორტი გარედან მისაწვდომი უნდა იყოს და განსხვავდებოდეს OR-პორტისთვის განსაზღვრულისგან.
# აირიდეთ 9001 ვინაიდან, მეტად გაიგივებულია Tor-თან და ცენზორებმა შეიძლება გადაამოწმონ ინტერნეტიდან ეს პორტი.
ServerTransportListenAddr obfs4 0.0.0.0:TODO2

# ადგილობრივი კავშირის პორტი Tor-სა და obfs4-ს შორის.  ყოველთვის მიუთითეთ „auto“.
# „Ext“ ნიშნავს გაფართოებულს, „extended“ და არა გარეს, „external“.  არ სცადოთ ცალკეული პორტის ნომრის მითითება ან 0.0.0.0. პორტის დაყენება კავშირის მისაღებად.
ExtORPort auto

# შეცვალეთ „<address@email.com>“ თქვენი ელფოსტით, რომ შევძლოთ თქვენთან დაკავშირება, თუ რამე ხარვეზი წარმოექმნება გადამცემ ხიდს.
# ეს არაა სავალდებულო მაგრამ სასურველია.
ContactInfo <address@email.com>

# აირჩიეთ სასურველი მეტსახელი ხიდისთვის.  არასავალდებულოა.
Nickname PickANickname

არ დაგავიწყდეთ შეცვალოთ ORPort, ServerTransportListenAddr, ContactInfo და Nickname პარამეტრები.

  • თუ გადაწყვეტთ უცვლელ obfs4-პორტად გამოიყენოთ 1024-ზე ქვემოთ (მაგალითად 80 ან 443), საჭირო იქნება obfs4-ს მისცეთ CAP_NET_BIND_SERVICE შესაძლებლობა, რომ მიაბას პორტი ძირეული მომხმარებლის გარეშე:

sudo setcap cap_net_bind_service=+ep /usr/bin/obfs4proxy

სისტემის მდგრადობის გასაუმჯობესებლად, ასევე უნდა მიუთითოთ NoNewPrivileges=no მისამართებზე /lib/systemd/system/tor@default.service და /lib/systemd/system/tor@.service შემდეგ კი გაუშვათ systemctl daemon-reload. ვრცლად, იხილეთ ხარვეზი 18356.

  • 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.

6. Restart Tor

Enable and Start tor:

# systemctl enable --now tor@default

Or restart it if it was running already, so configurations take effect:

# systemctl restart tor

7. Monitor your logs

იმის დასამოწმებლად, რომ თქვენი გადამცემი ხიდი გაშვებულია უხარვეზოდ, უნდა იხილოთ ასეთი რამ (ჩვეულებრივ მისამართზე /var/log/tor/log ან /var/log/syslog):

[notice] Your Tor server's identity key fingerprint is '<NICKNAME> <FINGERPRINT>'
[notice] Your Tor bridge's hashed identity key fingerprint is '<NICKNAME> <HASHED FINGERPRINT>'
[notice] Registered server transport 'obfs4' at '[::]:46396'
[notice] Tor has successfully opened a circuit. Looks like client functionality is working.
[notice] Bootstrapped 100%: Done
[notice] Now checking whether ORPort <redacted>:3818 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)
[ცნობა] თვითშემოწმება აჩვენებს, რომ თქვენი ORPort ხელმისაწვდომია გარედან. მშვენიერია. გამოქვეყნდება სერვერის აღმწერი.

8. 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.