Using Tor

Feed

date: 2022-12-23 14:19:31

categories: tools

firstPublishDate: 2022-12-23 14:19:31

Tor is network that preserves the anonymity of the users and services.

On the

tor project page

, you can download the tor browser and browse the web anonymously.

The list of active tor relays is available at

https://nusenu.github.io/OrNetStats/w/

https://nusenu.github.io/OrNetStats/w/

.

In this article, I show how to create onion services in Debian Bullseye:

Onion services are within the tor network and don't need tor exit nodes.

To create onion service, you need:

After starting tor, it takes less than 30 seconds for the onion service to become accessible.

To create a regular internet service, you need:

From my experience, the tor network is quite slow, it's like using the internet with a 56kbauds modem.

How to create a simple http onion service

The web server I use is my simple web server: liveserver.

First, install `sheepy`(build system) as root:

Then, start the web server, it opens port 80:

Create a tor configuration in your home directory (replace USER with your username):

The onion service configuration is stored in `/home/USER/tor/my_website`, create these directories with correct permissions and start tor (as username, not as root):

The onion address is generated by tor and stored in `/home/USER/tor/my_website/hostname`

To connect to the server, open `abc...onion` in the tor browser.

It is possible to choose the start of the onion address with `mkp224o`, it is compiled like this:

Run the following command to get onion addresses starting with `name`:

Choose an onion address, copy it the service configuration directory and restart tor:

How to create an SSH onion service

Add an onion service to `.torrc`:

Install `torsocks` and start the ssh client like this:

How to create a newsgroups onion service

On the server, install `tor` and the nntp server `inn2`:

apt issues an error for `inn2` because `inn.conf` is invalid (on debian bullseye and more recent) and needs to be changed.

Configure inn2:

Create a group:

Enable world access, add the lines below between `auth localhost` and `access localhost`:

Restart inn2:

In the

Setting up a newsgroup server article

, I configured TLS and with tor it is unnecessary, the server uses port 119.

Configure the onion service in `.torrc`, add these lines:

Create the service directory and restart tor:

On the client, install `slrn` newsgroup client:

Configure slrn, `ADDRESS_IN_HOSTNAME.onion` is the string in `/home/USER/tor/my_newsgroup/hostname`:

Execute srln to connect, first time:

Creating my own client and server

Add an onion service to `.torrc`:

My server code is:

Compile with:

The client has to connect to tor socks5 proxy, the socks5 protocol is described in the

SOCKS5 RFC 1928

My client code is:

Run the client with the onion address as argument:

TOR/socks5 times:

How to create an irc onion service and connect to it

Install an IRC server:

Add an onion service configuration to .torrc:

Restart tor:

The irc client I use is `tinyirc`, with the `torsocks` command it can connect to the irc onion service:

I tried torsocks with irssi and weechat but couldn't connect the irc onion service, I could connect regular irc service with a tor exit node.

Then I added support for socks5 proxys directly in tinyirc:

Then apply the patch `0001-add-socks5-client-code.patch` (keep the tabs otherwise it wont apply) to commit 83ee1dae701de8c968044248fb9e2a6257dd5b74 (latest):

Build `tinyirc`:

Connect to server with these commands:

Failed experiment: gemini client and server

For gemini over tor experiment, I used the `gmnisrv` gemini server and the `amfora` gemini client.

Install `gmnisvr` as described in the my article

Building telescope gmni and gmnisvr

.

Add a service in .torrc:

Amfora has a commit in which socks5 support is added:

But there is no release with this commit:

So I compile `amfora` from source (install go, then compile amfora):

In `gmnisrv`, I get the error:

Hashtag: #tor

Feed

Guestbook

Proxied content from gemini://gmi.noulin.net/2022-12-23-using-tor.gmi (external content)

Gemini request details:

Original URL
gemini://gmi.noulin.net/2022-12-23-using-tor.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.