[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

This is an old revision of the document!


irssi on tor

1. Introduction

This wiki shows a method you can follow to torify irssi for an irc session on freenode with Slackware Linux.

1.1. irssi (1)

irssi is a Command Line terminal based IRC client for UNIX systems.

If you followed a default installation, you should already have irssi. Otherwise it is available from the n directory on the S lackware DVD

1.1.1 irc (2)

The IRC (Internet Relay Chat) protocol has been designed for use with text based conferencing.

1.1.1 Freenode (3)

The Freenode IRC Server provides discussion facilities for the Free and Open Source Software communities. Amongst its channels one finds those that cater for discussion on Slackware, e.g. the #slackware channel.

1.2 tor (4)

tor (The Onion Router) provides anonymity for dissidents and whistle blowers around the world. It also channels traffic throug h port 443, thus it can be used to penetrate through some dumb firewalls that block some services to the users relying only on the destination port information.

A SlackBuild for tor is maintained on the slackbuilds.org repository. You will also need tsocks, that is listed as an optional dependency, as you will be using torify.

If you are using a desktop, I recommend to install also vidalia. A SlackBuild for vidalia is also found on the slackbuilds.org repository. If you choose to use vidalia, then do not start tor manually, as otherwise vidalia will get confused and quit. If on the other hand you do not want vidalia, then you will need to start tor manually. As root perform the following commands to start tor

# chmod +x /etc/rc.d/rc.tor
# /etc/rc.d/rc.tor start

I recommend to install the latest realeases of tor (and vidalia if installed) from the official download sites, as the SlackBu ilds are not always updated. Modify the scripts to target the updated source code if needed.

1.3 misuse

Some sorry individuals might persue this option for trolling purposes. Although I am not going to deviate on this subject, tro lling is a sure sign of a personality disorder. Seek professional help as trolling is not going to ease your frustrations! Als o note that you will need to register you nick before starting so you will be banned after you get detected anyway.

2.0

You will need to register your nick with freenode.net. You will need a valid e-mail address to do that. The procedure to regis ter your nick is may be followed from here: http://freenode.net/faq.shtml#nicksetup so I will not repeat it.

3.0 SASL Authentication

Then you will need to logon Freenode via SASL authentication.

Install cpan2tgz. A SlackBuild for cpan2tgz is available from slackbuilds.org

Then proceed to install some required CPAN perl modules:

As root, execute the following commands. Note that you will need an Internet connection

cpan2tgz Crypt::Blowfish
cpan2tgz Crypt::DH Crypt::OpenSSL::Bignum
cpan2tgz Math::BigInt
cpan2tgz Math::BigInt::FastCalc
cpan2tgz Math::BigInt::GMP

Now as your usual non-privileged user, delete your irssi configurations files, to ensure consistency:

rm -rf $HOME/.irssi
irssi

Quit irssi by entering

/quit

Edit the 3rd line from the last of $HOME/.irssi/config to accomodate your nick. For example: From:

core = { real_name = "Chris"; user_name = "chris"; nick = "chris"; };

To:

core = { real_name = "Chris"; user_name = "Chris Abela"; nick = "ChrisAbela"; };

Then proceed as follows:

mkdir -p $HOME/.irssi/scripts/autorun
cd $HOME/.irssi/scripts/
wget http://freenode.net/sasl/cap_sasl.pl
ln -s ../cap_sasl.pl autorun/
cd
irssi

In the irssi session, enter the following commands:

/network add Freenode
/server add -auto -ssl -ssl_verify -network Freenode irc.freenode.net 7000
/save
/script load cap_sasl.pl
/sasl set Freenode <nick> <password> DH-BLOWFISH

Naturally enter your actual nick and password in where indicated.

Proceed like this:

/sasl save
/save
/quit

Next time you run irssi, you will automatically logon Freenode without being asked for the password, this indicates that your SASL authentication has been succesful.

4.0 Torifying irssi

To connect to freenode with tor, start it as follows:

http_proxy=http://127.0.0.1:6677/ torify irssi

and it will fail miserably! This is my result:

20:45 -!- Irssi: Looking up irc.freenode.net
20:45 -!- Irssi: SASL: auth loaded from /home/chris/.irssi/sasl.auth
20:46 -!- Irssi: Connecting to irc.freenode.net [195.148.124.79] port 7000
20:46 -!- Irssi: warning SSL handshake failed: Connection reset by peer
20:46 -!- Irssi: Connection lost to irc.freenode.net

You will need to connect to the Freenode's tor's hidden service address: p4fsi4ockecnea7l.onion

/server p4fsi4ockecnea7l.onion

Be aware that the connection will be slow. If you are using vidalia, you may try changing your proxy server for a better conne ct. Eventually, you should manage to log in but you have to be patient and accept some latency.

You may check that you are chatting anonymously:

/whois <nick>

I obtained the following result:

20:55 -!- ChrisAbela [~chris@gateway/tor-sasl/chrisabela]
20:55 -!-  ircname  : Chris
20:55 -!-  server   : asimov.freenode.net [TX, USA]
20:55 -!-  hostname : gateway/tor-sasl/chrisabela 255.255.255.255
20:55 -!-  idle     : 0 days 0 hours 0 mins 25 secs [signon: Sat Feb  9 20:55:24 2013]
20:55 -!-  account  : ChrisAbela
20:55 -!- End of WHOIS

Note that the username is leaked!

Then proceed as usual:

/j #slackware

5.0 References

 playground:irssi_on_tor ()