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. მიჰყევით მითითებებს ავტომატური პროგრამული განახლებების ჩასართავად, თქვენს საოპერაციო სისტემაზე.

2. Package installation

Recent OpenBSD systems, since 6.5, already have the repository configured on /etc/installurl so we do not need to bother changing it.

თუ თქვენს შემთხვევაში ასე არაა, გთხოვთ გამართოთ installurl შემდეგნაირად:

# echo "https://cdn.openbsd.org/pub/OpenBSD" > /etc/installurl

განაგრძეთ pkg_add და დააყენეთ კრებული:

# pkg_add tor

თუ გსურთ დააყენოთ უფრო ახალი ვერსიის tor კრებული OpenBSD-ისთვის, შეგიძლიათ გამოიყენოთ M:Tier-ის ბინარული კრებულები:

# ftp https://stable.mtier.org/openup

როგორც კი openup იქნება მიღებული, შეგიძლიათ გაუშვათ იგი M:Tier-ის საცავთან სინქრონიზაციისთვის და განაახლოთ თქვენი კრებულები; ამით შეიძლება შენაცვლდეს pkg_add -u.

ახლა კი როგორ განაგრძოთ შემდეგი ნაბიჯებით:

# ./openup

3. Configuration file

განათავსეთ გასამართი ფაილი /etc/tor/torrc სათანადო ადგილას:

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
DataDirectory /var/tor
User          _tor
RunAsDaemon   1

4. Change openfiles-max and maxfiles

By default, OpenBSD maintains a rather low limit on the maximum number of open files for a process. For a daemon such as Tor's, that opens a connection to each and every other relay (currently around 7000 relays), these limits should be raised.

დაურთეთ შემდეგი აბზაცი ფაილს /etc/login.conf:

tor:\
    :openfiles-max=13500:\
    :tc=daemon:

OpenBSD ასევე ინახავს ბირთვის დონეზე ფაილის აღმწერის ზღვარს sysctl-ცვლადს kern.maxfiles.

ნაგულისხმევი 7030 გაზარდეთ 16000-მდე:

# echo "kern.maxfiles=16000" >> /etc/sysctl.conf
# sysctl kern.maxfiles=16000

5. Start the service

აქ მივუთითებთ, რომ tor გაეშვას ჩართვისას და ვიძახებთ პირველ ჯერზე:

# rcctl enable tor
# rcctl start tor

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.