Configuration for irssi with tor + sasl, freenode.
For my friends and some generic pattern matching creature, please!, no more questions about this configuration. RTFM! xD
# apt update
# apt install irssi tor
irssi
- Adding Freenode with tls 6697, never 6667
/server add -tls -tls_verify -network freenode -port 6697 chat.freenode.net
/save
/connect freenode
- Nick registration
/nick your_nick_here
/msg NickServ REGISTER YourPassword [email protected]
/quit
Check your email.
In the OS shell (Bash/Ksh)
1> openssl req -newkey rsa:2048 -days 730 -x509 -keyout your_nick.key -out your_nick.cert -nodes
2> cat your_nick.cert your_nick.key > your_nick.pem
3> openssl x509 -sha1 -noout -fingerprint -in your_nick.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/'
4> mv your_nick.pem ~/.irssi/config
-
Replace your_nick.key and your_nick.cert, for your nick, example: innaky.key, innaky.cert.
-
Follow the same logic for your_nick.pem.
-
With This line you get the fingerprint for add in your freenode account (the output is similar to: c2ba4db1ccc82cd3f8ec50ebcc3461628f95ab27).
-
copy or move the file .pem for the irssi config file in your home directory.
- Start irssi
irssi
/nick YourNick
/msg NickServ IDENTIFY YourNick YourPassword
/msg NICKSERV CERT ADD c2ba4db1ccc82cd3f8ec50ebcc3461628f95ab27
/quit
- Call your favorite editor and add in the last line:
sudo emacs -nw /etc/tor/torrc
mapaddress 10.40.40.40 freenodeok2gncmy.onion
-
Start irssi
-
Inside irssi
/network add -sasl_username <YourFreenodePassword> -sasl_password ~/.irssi/your_nick.pem -sasl_mechanism EXTERNAL freenodetor
/server add -auto -net freenodetor -ssl -ssl_cert ~/.irssi/your_nick.pem freenodeok2gncmy.onion 6697
/save
torify irssi -n YourFreenodeUser
Example:
torify irssi -n innaky
- Cloak
Inside of irssi console use this command /whois and check your user.
The freenode server added in your cloak of host, this:
~your_user@gateway/tor-sasl/your_user
Example:
~innaky@gateway/tor-sasl/innaky
- Check certificate fingerprint
If you use the command /whois you can see something like this,
has client certificate fingerprint c2ba4db1ccc82cd3f8ec50ebcc3461628f95ab27
- User mode
You can see in your irssi window (bottom left) this (but with your nick):
innaky(+Zi)
If you have the all checks, you are navigating in anonymous form! :)
-
The freenode user is the same of the .pem file.
-
emacs -nw Emacs is my favorite editor, but you can use nano, vi, vim
-
Customizing another IPv4
The 10.40.40.40 is arbitrary you can change it for anyone other.
Example:
You want this IPv4 10.17.23.41, ok
You need follow this steps:
- Edit torrc file
sudo emacs -nw /etc/tor/torrc
Add in the last line:
mapaddress 10.17.23.41 freenodeok2gncmy.onion
- Restart torrc
sudo systemctl restart tor
- Irssi file configuration
emacs -nw ~/.irssi/config
Search the chatnet = "freenodetor"; and change the address = "10.40.40.40" by address = "10.17.23.41"
The output is similar this:
{
address = "10.17.23.41";
chatnet = "freenodetor";
port = "6697";
use_tls = "yes";
tls_cert = "~/.irssi/innaky.pem";
tls_verify = "no";
autoconnect = "yes";
},
Configuración con TOR + SASL + irssi para Freenode
Para mis amistades y todos aquellos seres que hagan pattern matching con criatura, por favor!, no más preguntas sobre esta configuración RTFM! xD
# apt update
# apt install irssi tor
- Ejecuta irssi.
irssi
- Dentro de irssi escribe
/server add -tls -tls_verify -network freenode -port 6697 chat.freenode.net
/save
/connect freenode
De esta forma le decimos al irssi que cuando pidamos conectarnos a freenode, siempre sea a través del puerto 6697, aquí su RFC
- Registro
Una vez conectada al Freenode, en la línea de abajo agrega:
/nick coloca_tu_nick_aquí
/msg NickServ REGISTER TuContraseñaAquí [email protected]
/quit
y revisa tu correo electrónico.
En la consola/shell (Bash, Ksh o Zsh)
1> openssl req -newkey rsa:2048 -days 730 -x509 -keyout tu_nick.key -out tu_nick.cert -nodes
2> cat tu_nick.cert tu_nick.key > tu_nick.pem
3> openssl x509 -sha1 -noout -fingerprint -in tu_nick.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/'
4> mv tu_nick.pem ~/.irssi/config
Notas:
- Reemplaza tu_nick por el tuyo, obvio no? xD
- Igualmente con tu_nick
- Esta línea generará tu huella, será algo similar a esto: c2ba4db1ccc82cd3f8ec50ebcc3461628f95ab27 (eso lo agregaremos a tu cuenta freenode)
- El archivo .pem generado, copialo al directorio de irssi.
- Llamamos al irssi
irssi
- Dentro de irssi, agrega lo siguiente:
/nick Tu_nick
/msg NickServ IDENTIFY Tu_Nick YourPassword
/msg NICKSERV CERT ADD c2ba4db1ccc82cd3f8ec50ebcc3461628f95ab27
/quit
Con tu editor favorito (emacs, verdad? xD), agrega lo siguiente al final de este archivo /etc/tor/torrc
sudo emacs -nw /etc/tor/torrc
mapaddress 10.40.40.40 freenodeok2gncmy.onion
- Inicia irssi
- Dentro de irssi ejecuta lo siguiente:
/network add -sasl_username <TuContraseñaFreenode> -sasl_password ~/.irssi/tu_nick.pem -sasl_mechanism EXTERNAL freenodetor
/server add -auto -net freenodetor -ssl -ssl_cert ~/.irssi/tu_nick.pem freenodeok2gncmy.onion 6697
/save
torify irssi -n tu_freenode_nick
- Si escribes el comando /whois en la ventana 1 del irssi revelará información, entre ellas tu capa o nombre asociado a tu hostname, será algo similar a esto:
~innaky@gateway/tor-sasl/innaky
-
La siguiente información es tu huella, debe ser igual a la agregada en los pasos anteriores.
-
El modo de tu usuaria debe ser:
innaky(+Zi)
Si pasastes todos los checks, estas conectada usando tor.
- El archivo .pem que generas colócale tu nick.
- el comando emacs -nw es porque emacs es mi editor favorito, pero eres libre de usar el que ames.
- Los tutos de la red hablan de 10.40.40.40, pero ¿qué sucede si deseas 10.17.23.41?
ok!,
sólo debes seguir los siguientes pasos:
- Edita el archivo /etc/tor/torrc, cambia 10.40.40.40 por 10.17.23.41
- Restaura tor
# systemctl restart tor
- En el archivo de ~/.irssi/config, busca la configuración de freenodetor y cambia 10.40.40.40 por 10.17.23.41
La salida sería algo como lo siguiente:
{
address = "10.17.23.41";
chatnet = "freenodetor";
port = "6697";
use_tls = "yes";
tls_cert = "~/.irssi/innaky.pem";
tls_verify = "no";
autoconnect = "yes";
},