Group: LibrePlanet Italia/miniguida-freenode.en

From LibrePlanet
Jump to: navigation, search
m (Fixed changed link to sasl script)
(Section about TOR+SASL connection updated)
Line 1: Line 1:
 
{{Languages|master page=miniguida-freenode|language=en}}
 
{{Languages|master page=miniguida-freenode|language=en}}
  
''The information contained in this mini-guide is current as of: 7/2/2011.''
+
''The information contained in this mini-guide is current as of: 13/09/2011.''
  
 
''The text in this page was last modified on: {{REVISIONDAY}}/{{REVISIONMONTH}}/{{REVISIONYEAR}}.''
 
''The text in this page was last modified on: {{REVISIONDAY}}/{{REVISIONMONTH}}/{{REVISIONYEAR}}.''
Line 99: Line 99:
  
 
Consequently, this connection method is more complex and articulated than the previouses, as it requires the satisfaction of certain additional requirements:
 
Consequently, this connection method is more complex and articulated than the previouses, as it requires the satisfaction of certain additional requirements:
* <tt>Tor</tt> must be properly installed and its service must be running (it is *strongly* recommended that you install the latest version of the available packages from the official repositories of the [http://www.torproject.org <tt>tor</tt>] project, at: https://www.torproject.org/download/download-unix.html.en). <br />Togheter with <tt>tor</tt>, is also recommended the installation of the latest version of the <tt>polipo</tt> and <tt>geoipdb-tor</tt> packages. <br />For installation and configuration of <tt>tor</tt> see the  [https://www.torproject.org/docs/tor-doc-unix.html.en official guide].
+
* <tt>Tor</tt> must be properly installed and its service must be running. It is *strongly* recommended that you install the latest version of the available packages from the official repositories of the [http://www.torproject.org <tt>tor</tt>] project, at: https://www.torproject.org/download/download-unix.html.en).<br />Warning - For installation and configuration of <tt>tor</tt> see the  [https://www.torproject.org/docs/tor-doc-unix.html.en official guide] (it is also recommended the installation of the <tt>vidalia</tt> and <tt>geoipdb-tor</tt> packages). <br />
* The system must have installed the support for <tt>SSL</tt> (install the <tt>openssl</tt> package) and also some libraries for encryption (<tt>libcrypt-openssl-bignum-perl</tt>, <tt>libcrypt-dh-perl</tt>, <tt>libcrypt-blowfish-perl</tt>). <br />Note - The required packages may differ depending on the system in use.
+
* The system must have installed the support for <tt>SSL</tt> (install the <tt>openssl</tt> package) and also some libraries for encryption (<tt>libcrypt-openssl-bignum-perl</tt>, <tt>libcrypt-dh-perl</tt>, <tt>libcrypt-blowfish-perl</tt>). <br />Note: The required packages for <tt>SSL</tt> may differ depending on the system in use.
 
* A registered and verified <tt>NickServ</tt> account on <tt>freenode</tt> is needed (for the registration procedure, see: http://freenode.net/faq.shtml#userregistration).
 
* A registered and verified <tt>NickServ</tt> account on <tt>freenode</tt> is needed (for the registration procedure, see: http://freenode.net/faq.shtml#userregistration).
 +
* You must have an appropriate framework for <tt>SASL</tt> authentication and security in <tt>XChat</tt> (which can be implemented using a specific script placed in the directory <tt>~/.Xchat2</tt>, to be loaded each time <tt>XChat</tt> is opened).
  
A specific script is needed to make the authentication and security <tt>SASL</tt> framework available to <tt>XChat</tt>. This script should be placed in the <code>~/.xchat2</code> directory, in order to be loaded when <tt>XChat</tt> is opened.
+
A convenient way to implement <tt>SASL</tt> support in <tt>XChat</tt> is obtained using the following commands to download and install a specific Perl script (released under GNU GPL) made available directly from freenode:
 
 
The <tt>SASL</tt> support in <tt>XChat</tt> could be obtained using the following commands:
 
 
<code>
 
<code>
 
         $ cd ~/.xchat2
 
         $ cd ~/.xchat2
         $ wget http://adipose.attenuate.org/~stephen/ircd-seven/sasl/cap_sasl_xchat.py
+
         $ wget http://freenode.net/sasl/cap_sasl_xchat.pl
 
</code>
 
</code>
Warning - This Python script seems to work fine, and is released under the GNU GPL license. <br />The Perl script available from <nowiki>http://freenode.net/sasl/</nowiki> do NOT seems working well with <tt>XChat</tt>.
+
Warning - Python version of this script does NOT seem to work with Debian and its derivatives (see: http://freenode.net/sasl/README.txt).
 
 
Note - The help for the <tt>SASL</tt> command in <tt>XChat</tt> could be obtained typing: <code>/HELP SASL</code>
 
  
At this point, we can finally set <tt>XChat</tt>. Having to use <tt>tor</tt> unlike previous cases, now the client must be configured to use the proxy server.
+
Once these requirements have been fulfilled, we can finally configure <tt>XChat</tt>. Having to use <tt>tor</tt> unlike previous cases, now the client must be configured to use the proxy server.
  
 
# From the <em>Settings -> Preferences</em> menu, go to the <em>Network</em> category and open <em>Network setup</em> to configure it as follows:
 
# From the <em>Settings -> Preferences</em> menu, go to the <em>Network</em> category and open <em>Network setup</em> to configure it as follows:
Line 141: Line 138:
 
#*: - <em>Character set</em>: <tt>UTF-8</tt>
 
#*: - <em>Character set</em>: <tt>UTF-8</tt>
 
# To ensure that the <tt>SASL</tt> framework is used by the <tt>FreeNode-TorSASL</tt> network, in the command area of <tt>XChat</tt> type the command:
 
# To ensure that the <tt>SASL</tt> framework is used by the <tt>FreeNode-TorSASL</tt> network, in the command area of <tt>XChat</tt> type the command:
#:<code>/SASL -set FreeNode-TorSASL mynickname mypassword</code>
+
#:<code>/SASL set FreeNode-TorSASL mynickname mypassword mechanism</code>
 
#: where:
 
#: where:
#: - <code>FreeNode-TorSASL</code> is the name of the network for which <tt>SASL</tt> have to be used (Warning - Since it is case-sensitive, it must match *exactly* the name assigned to the network for which <tt>SASL</tt> have to be used)
+
#: - <code>FreeNode-TorSASL</code> is the name of the network for which <tt>SASL</tt> have to be used
 
#: - <code>mynickname</code> is the nickname of the registered and verified <tt>NickServ</tt> account on <tt>freenode</tt> that you are using (see above)
 
#: - <code>mynickname</code> is the nickname of the registered and verified <tt>NickServ</tt> account on <tt>freenode</tt> that you are using (see above)
#: - <code>mypassword</code>: is the password of the registered and verified <tt>NickServ</tt> account on <tt>freenode</tt> that you are using (see above)  
+
#: - <code>mypassword</code>: is the password of the registered and verified <tt>NickServ</tt> account on <tt>freenode</tt> that you are using (see above)
# Close and reopen <tt>XChat</tt>
+
#: - <code>mechanism</code>: is the authentication mechanism to be used (for safety reasons, it is *strongly* recommended to set this parameter as: <tt>DH-BLOWFISH</tt>)
 +
# To avoid having to type the above command each time you start <tt>XChat</tt>, save the <tt>SASL</tt> configuration typing in <tt>XChat</tt> the command:
 +
#:<code>/SASL save</code>
 +
#:Note: To view the help on the SASL command, type in <tt>XChat</tt> the command: <code>/HELP SASL</code>
 +
# Close and reopen <tt>XChat</tt>.
  
 
The configuration of this new <tt>FreeNode-TorSASL</tt> network will appear in the <code>/~.xchat2/servlist_.conf</code> file. It will be something as:
 
The configuration of this new <tt>FreeNode-TorSASL</tt> network will appear in the <code>/~.xchat2/servlist_.conf</code> file. It will be something as:
Line 162: Line 163:
 
</code>
 
</code>
  
The correspondence between the <tt>FreeNode-TorSASL</tt> network and the <tt>SASL</tt> framework will result in a special section within the <code>~/.xchat2/sasl.conf</code> file. It will be something as:
+
The parameters for the SASL authentication will result (if saved) in the <tt>~/.xchat2/sasl.auth</tt> file.
<code>
 
        [FreeNode-TorSASL]
 
        nick = mynickname
 
        password = mypassword
 
        mechanism = PLAIN
 
</code>
 
To increase security, it is *strongly recommended* to replace in this file the line:
 
<code>
 
        mechanism = PLAIN
 
</code>
 
with:
 
<code>
 
        mechanism = DH-BLOWFISH
 
</code>
 
  
 
You can now connect via <tt>Tor</tt>+<tt>SASL</tt> to the <tt>FreeNode-TorSASL</tt> network you just created.
 
You can now connect via <tt>Tor</tt>+<tt>SASL</tt> to the <tt>FreeNode-TorSASL</tt> network you just created.
  
Note: In some circumstances, probably due to the latency of the <tt>tor</tt> network, the connection might be slow or difficult.
+
Note: In some circumstances, probably due to the latency of the <tt>tor</tt> network, the connection might be slow or difficult (in this case it may be useful to modify the script <tt>cap_sasl_xchat.pl</tt> to increase the duration of the authentication time-out).
  
  
 
----
 
----
 
''[ Document edited by: [[User:Alexus|alexus]] ]''
 
''[ Document edited by: [[User:Alexus|alexus]] ]''

Revision as of 11:32, 13 September 2011

The information contained in this mini-guide is current as of: 13/09/2011.

The text in this page was last modified on: 13/09/2011.

Introduction

The freenode network hosts a lot of IRC channels dedicated to free software: #gnu, #fsf, #libreplanet, #gnewsense and many others.

From January 30, 2010 freenode has migrated their servers from from ircd to ircd-seven. This led to several changes, including the possibility of connection in a safe and anonymous way via SSL or via Tor+SASL. These two methods (alternatives to one another) offer much more privacy and security in communication and authentication than the usual "clear" connection mode.

Here below is a brief description about how to configure XChat (one of the best and most used IRC clients) to connect to freenode in different ways as possible (clear, via SSL and via Tor+SASL).

Prerequisites

  • A 100% free GNU/Linux distribution, as is gNewSense :-)
  • The XChat (> = 2.8.4) package, properly installed
    Note: In the GNU/Linux distributions which use .deb packages (as gNewSense), XChat could be installed with the command:
    $ sudo apt-get install xchat

XChat: clear connection to freenode

  1. From the XChat menu, open the Network list (Ctrl + S)
  2. Click the Add button in order to create a new network and call it (with no spaces): FreeNode
  3. Select the FreeNode network you just created and click on the Edit button to configure it as follows:
    • in Servers for …, click on Add and set as server:
      irc.freenode.net/8001
    • in the same section, set:
      - Connect to selected server only: do NOT check
    • in the Your Details section, enter the values for Nick name, User name and Real name
    • in the Connecting section set:
      - Auto connect …: set as desired
      - Use a proxy server: do NOT check
      - Use SSL for all the servers on this network: do NOT check
      - Accept invalid SSL certificate: do NOT check
      - Channels to join: #libreplanet, #gnewsense, … other channels as you like, separated by commas, no spaces…
      - Connect command: leave blank
      - Nickserv password: leave blank
      - Server password: to be set only if you are using a nickname registered and verified on freenode
      - Character set: UTF-8

The configuration of this new FreeNode network will appear in the /~.xchat2/servlist_.conf file. It will be something as:

       N=FreeNode
       I=mynickname
       U=mynickname
       R=mynickname
       P=mypassword
       J=#libreplanet,#gnewsense
       E=UTF-8 (Unicode)
       F=1
       D=0
       S=irc.freenode.net/8001

After closing the setup windows, you can connect in clear to the FreeNode network you just created.

XChat: SSL connection to freenode

  1. From the XChat menu, open the Network list (Ctrl + S)
  2. Click the Add button in order to create a new network and call it (with no spaces): FreeNode-SSL
  3. Select the FreeNode-SSL network you just created and click on the Edit button to configure it as follows:
    • in Servers for …, click on Add and set as server:
      irc.freenode.net/7070
    • in the same section, set:
      - Connect to selected server only: do NOT check
    • in the Your Details section, enter the values for Nick name, User name and Real name
    • in the Connecting section set:
      - Auto connect …: set as desired
      - Use a proxy server: do NOT check
      - Use SSL for all the servers on this network: CHECK
      - Accept invalid SSL certificate: CHECK
      - Channels to join: #libreplanet, #gnewsense, … other channels as you like, separated by commas, no spaces…
      - Connect command: leave blank
      - Nickserv password: leave blank
      - Server password: to be set only if you are using a nickname registered and verified on freenode
      - Character set: UTF-8

The configuration of this new FreeNode-SSL network will appear in the /~.xchat2/servlist_.conf file. It will be something as:

       N=FreeNode-SSL
       I=mynickname
       U=mynickname
       R=mynickname
       P=mypassword
       J=#libreplanet,#gnewsense
       E=UTF-8 (Unicode)
       F=37
       D=0
       S=irc.freenode.net/7070

After closing the setup windows, you can connect via SSL to the FreeNode-SSL network you just created.

XChat: Tor+SASL connection to freenode

Connecting to freenode by Tor+SASL requires the use of the new dedicated tor hidden service p4fsi4ockecnea7l.onion (for details see: http://blog.freenode.net/2010/01/connecting-to-freenode-using-tor-sasl/ and http://freenode.net/irc_servers.shtml#tor) and also the use of SASL authentication mechanism that could be handled by XChat.

Consequently, this connection method is more complex and articulated than the previouses, as it requires the satisfaction of certain additional requirements:

  • Tor must be properly installed and its service must be running. It is *strongly* recommended that you install the latest version of the available packages from the official repositories of the tor project, at: https://www.torproject.org/download/download-unix.html.en).
    Warning - For installation and configuration of tor see the official guide (it is also recommended the installation of the vidalia and geoipdb-tor packages).
  • The system must have installed the support for SSL (install the openssl package) and also some libraries for encryption (libcrypt-openssl-bignum-perl, libcrypt-dh-perl, libcrypt-blowfish-perl).
    Note: The required packages for SSL may differ depending on the system in use.
  • A registered and verified NickServ account on freenode is needed (for the registration procedure, see: http://freenode.net/faq.shtml#userregistration).
  • You must have an appropriate framework for SASL authentication and security in XChat (which can be implemented using a specific script placed in the directory ~/.Xchat2, to be loaded each time XChat is opened).

A convenient way to implement SASL support in XChat is obtained using the following commands to download and install a specific Perl script (released under GNU GPL) made available directly from freenode:

       $ cd ~/.xchat2
       $ wget http://freenode.net/sasl/cap_sasl_xchat.pl

Warning - Python version of this script does NOT seem to work with Debian and its derivatives (see: http://freenode.net/sasl/README.txt).

Once these requirements have been fulfilled, we can finally configure XChat. Having to use tor unlike previous cases, now the client must be configured to use the proxy server.

  1. From the Settings -> Preferences menu, go to the Network category and open Network setup to configure it as follows:
    • in the Proxy server section set:
      - Hostname: localhost
      - Port: 9050
      - Type: Sock5
      - Use proxy for: All connections
  2. From the XChat menu, open the Network list (Ctrl + S)
  3. Click the Add button in order to create a new network and call it (with no spaces): FreeNode-TorSASL
  4. Select the FreeNode-TorSASL network you just created and click on the Edit button to configure it as follows:
    • in Servers for …, click on Add and set as server:
      p4fsi4ockecnea7l.onion
    • in the same section, set:
      - Connect to selected server only: do NOT check
    • in the Your Details section, enter the values for Nick name, User name and Real name
      Warning - You must use a registered and verified NickServ account on freenode (for the registration procedure, see: http://freenode.net/faq.shtml#userregistration)
    • in the Connecting section set:
      - Auto connect …: set as desired
      - Use a proxy server: CHECK
      - Use SSL for all the servers on this network: do NOT check
      - Accept invalid SSL certificate: do NOT check
      - Channels to join: #libreplanet, #gnewsense, … other channels as you like, separated by commas, no spaces…
      - Connect command: leave blank
      - Nickserv password: leave blank
      - Server password: set the password corresponding to the registered and verified NickServ account on freenode that you are using (see above)
      - Character set: UTF-8
  5. To ensure that the SASL framework is used by the FreeNode-TorSASL network, in the command area of XChat type the command:
    /SASL set FreeNode-TorSASL mynickname mypassword mechanism
    where:
    - FreeNode-TorSASL is the name of the network for which SASL have to be used
    - mynickname is the nickname of the registered and verified NickServ account on freenode that you are using (see above)
    - mypassword: is the password of the registered and verified NickServ account on freenode that you are using (see above)
    - mechanism: is the authentication mechanism to be used (for safety reasons, it is *strongly* recommended to set this parameter as: DH-BLOWFISH)
  6. To avoid having to type the above command each time you start XChat, save the SASL configuration typing in XChat the command:
    /SASL save
    Note: To view the help on the SASL command, type in XChat the command: /HELP SASL
  7. Close and reopen XChat.

The configuration of this new FreeNode-TorSASL network will appear in the /~.xchat2/servlist_.conf file. It will be something as:

       N=FreeNode-TorSASL
       I=mynickname
       U=mynickname
       R=mynickname
       P=mypassword
       J=#libreplanet,#gnewsense
       E=UTF-8 (Unicode)
       F=17
       D=0
       S=p4fsi4ockecnea7l.onion

The parameters for the SASL authentication will result (if saved) in the ~/.xchat2/sasl.auth file.

You can now connect via Tor+SASL to the FreeNode-TorSASL network you just created.

Note: In some circumstances, probably due to the latency of the tor network, the connection might be slow or difficult (in this case it may be useful to modify the script cap_sasl_xchat.pl to increase the duration of the authentication time-out).



[ Document edited by: alexus ]