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. Setup pkg_add
Modern versions of the NetBSD operating system can be set to use pkgin
, which is a piece of software aimed to be like apt
or yum
for managing pkgsrc binary packages. We are not convering its setup here, and opt to use plain pkg_add
instead.
# echo "PKG_PATH=http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All" > /etc/pkg_install.conf
3. Package installation
Install tor
NetBSD's package:
# pkg_add tor
4. Configuration file
Put the configuration file /usr/pkg/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
Here we set tor
to start during boot and call it for the first time:
# ln -sf /usr/pkg/share/examples/rc.d/tor /etc/rc.d/tor
# echo "tor=YES" >> /etc/rc.conf
# /etc/rc.d/tor start
6. 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.