How does Tor Onion work

TOR Network Installation Guide on OpenBSD


OpenBSD is a Unix-derived operating system that focuses on security and standards compliance. It is considered one of the most secure systems available. With its default installation, OpenBSD is able to install various applications very easily and quickly.

Likewise with the TOR application, with the help of the PKG package owned by OpneBSD, the TOR application can be installed in just a matter of minutes. In this article we will try to explain in detail about the TOR installation process on OpenBSD.

A. System Specifications

In creating the articles we write on publish0x, we use a computer that is not considered to have high specifications. The specifications of the computer we use are as follows:

  • OS: OpenBSD 7.6 amd64
  • IP Address: 192.168.5.3
  • Host: Acer Aspire M1800
  • Uptime: 3 mins
  • Packages: 95 (pkg_info)
  • Shell: ksh v5.2.14 99/07/13.2
  • Terminal: /dev/ttyp0
  • CPU: Intel Core 2 Duo E8400 (2) @ 3.0
  • Memory: 208MiB / 1775MiB

A. About TOR Network

The Tor Project is an intelligence solution developed by the US Navy, to protect US intelligence communications online. However, today, the project continues to function as a non-profit open source organization that promotes online privacy, and is open to the public. If you don’t know what the term “open source” means here; open source means that all of the project’s source code is shared publicly. Since all of the project’s source code is shared openly, the project can be developed more quickly by many volunteers, ensuring that there is no malicious code. In short; when a project is open source, it is under everyone’s control.

The development of Tor began in the mid-1990s when the US Naval Research Laboratory began experimenting with anonymity networks to protect government communications. Researchers Paul Syverson, Michael G. Reed, and David Goldschlag developed onion routing, a technique designed to hide the origin and destination of online communications by wrapping data in multiple layers of encryption. The technology was originally intended for secure intelligence operations and protecting the identities of government officials online.

In the early 2000s, the US government released onion routing technology into the public domain to help maintain anonymity for not only government officials but also journalists, human rights activists, and everyday internet users. In 2002, The Onion Routing Project, or Tor Project, was officially founded to advance and maintain this technology.

The Onion Router (TOR) Network

Tor is fundamentally based on the principle of obfuscation. To better understand how it works and see what kind of system we are actually relying on, let’s start by discussing the general working structure.

For the user anonymization process, 3 out of about 6500 volunteer servers are randomly selected.

These selected servers are called nodes. When connected to the Tor network, data packets are encrypted and sent through these three nodes to the target server. The server response packets are encrypted in the same way and sent to the user, through the three nodes. In this way, all traffic between the website and you is anonymized.

B. TOR Installation Process on OpenBSD

OpenBSD by default serves two TOR installation methods, namely with the PKG package and OpenBSD Ports. If we look at both of these methods are almost the same as FreeBSD. From both methods, the intent and purpose are the same, namely to install TOR.

1. Install TOR with the PKG Package

In this section we will explain how to install TOR with the PKG package. The method is very easy and is widely enjoyed by OpenBSD users.

Install Tor with PKG package
ns5# pkg_add -uvi
ns5# pkg_add tor

2. Install TOR with OpenBSD Ports

This second method is rarely used by OpenBSD users. In addition to being impractical, the installation process is also very slow. However, even so, if you install an application with OpenBSD Ports, all dependencies needed by the application are also installed. So it can be said that installing with Ports is more recommended than with the PKG package.

Install Tor with Ports
ns5# cd /usr/ports/net/tor
ns5# make clean=all
ns5# make
ns5# make package
ns5# make install

C. TOR Configuration Process on OpenBSD

After we finish installing TOR, either with the PKG or Ports package, the next step is to configure the TOR application.

1. Change the files "/etc/tor/torrc /etc/login.conf" and "/etc/sysctl.conf"

The file "/etc/tor/torrc" is the main configuration file of TOR. You must adjust this file so that it can run perfectly. In this article we will give examples of several scripts that you must activate (adjust to your server and needs).

Script for File "/etc/tor/torrc"
SOCKSPort 192.168.5.3:9050
SOCKSPolicy accept 192.168.5.0/24
Log debug file /var/log/tor/debug.log
RunAsDaemon 1
DataDirectory /var/tor
User _tor
Log notice syslog

After that you also have to change the /etc/login.conf file.

Script for File "/etc/login.conf"
tor:\
:openfiles-max=13500:\
:tc=daemon:

Don't forget to type the following script in the /etc/sysctl.conf file.

Script for File "/etc/sysctl.conf"
kern.maxfiles=16000

2. Create Log File

Log files are very important to monitor TOR activities. The command below is a guide to create a TOR log file.

ns5# mkdir -p /var/log/tor
ns5# touch /var/log/tor/debug.log
ns5# chown -R _tor:_tor /var/log/tor

3. Activate and Run TOR

Once everything has been set according to the instructions above, you can immediately activate and run TOR.

ns5# rcctl enable tor
ns5# rcctl restart tor

D. Check TOR

This step is very important and the most awaited by you, because we will see the results, whether the TOR that we have installed and configured has run or not. To check whether TOR is running or not you can use the curl command, as in the example below.

ns5# curl \
-x socks5h://192.168.5.3:9050 \
-s https://check.torproject.org/api/ip
{"IsTor":true,"IP":"45.141.215.88"}

In the test results above, the IP "45.141.215.88" is the IP of the TOR Project. You can also replace the address https://check.torproject.org/api/ip, with another address, such as the following example.

ns5# curl \
-x socks5h://192.168.5.3:9050 \
-s https://www.inchimediatama.org

If the result is as shown in the example above, it means that your TOR is active on the OpenBSD server. You can use TOR to be combined with other applications as a proxy or others.

How do you rate this article?

2


BSD Blockchain
BSD Blockchain

https://unixwinbsd.site


Linux BSD Blockchain
Linux BSD Blockchain

Opensource Blog (FreeBSD, Linux, OpenBSD) For Blockchain Network

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.