BitlBee

From LinuxReviews
Jump to navigationJump to search

BitlBee is a IRC gateway program for instant messaging services like XMPP (jabber), Hipchat as well as social network services like StatusNet and Twitter. It acts like a regular IRC server and creates a special IRC "channel" with all your contacts from configured services. You can use this channel to talk to your friends and contacts as if they were regular IRC users. It is also possible to use BitlBee from a web browser if you point a cgi-irc service at it.

How it works

BitlBee is "An IRC to other chat networks gateway". The BitlBee daemon is capable of connecting a wide range of supported built-in and also plugin-based supported IM services[1]

Your IRC client connects to BitlBee like any other IRC server, and after telling it about your accounts and passwords it creates a normal irc channel with all your IM contacts listed as regular irc users - and you can talk to them as if they were normal irc users.

If you do not want to run your own BitlBee server you can use one of the free public servers available.

Public Bitlbee Servers

The official server list is here: Public BitlBee servers

  • im.bitlbee.org 6667
  • irc.net 6667
  • im.okkernoot.net 6667
  • im.bulix.org 6668

Tor Bitlbee Servers

These are location hidden Tor-services.

  • 2uqqegdqdrw2mlit.onion 6667
  • zvv4lqu37sbndsao.onion 6667

Security

BitlBee is open source. It uses plaintext for the IM-protocols. It all too easy for a BitlBee operator to log conversations. It must also be mentioned that it is quite easy to modify the source so the BitlBee program spits out the username and passwords of all it's users.

That being said: It's probably safe to use most public BitlBee servers. But using them does involve a security risk, where as running your own BitlBee server does not.

Getting started

If you choose to connect to a public server then all you have to do is connect using any IRC client. Then join the control channel #bitlbee and read the help text.

/connect im.bitlbee.org
/j #bitlbee
help commands
help quickstart
help quickstart1
help quickstart2
help quickstart3

The command help quickstart will give you instructions on how to add IM accounts and use BitlBee, help commands will give a list of available commands.

First register your irc-nick with a password.

register kafjdg873h

An account is made using your current irc nick as identification with the password kafjdg873h. The password will only work when used together with the nick you had when you registered.

The next time you visit the server you can load your settings with

identify kafjdg873h

Your current user accounts on the various IM networks are registered with the account command (try help account for details).

  • Jabber: account add jabber username@jabber.org yourpassword
  • MSN: account add msn username@hotmail.com yourpassword
  • ICQ: account add oscar 648244897 yourpassword login.icq.com
  • AIM: account add oscar 321454897 yourpassword login.oscar.aol.com
  • YIM: account add yahoo username yourpassword
  • GMAIL account add jabber username@gmail.com youpassword talk.google.com:5223:ssl

Use account list to view what accounts are saved and their status.

To log into all your im servers type

 account on 

Type account list then use the number given to the service to delete an account. Example:

 account del 1

Configuration

To view what configuration options you have, type set:

  set
  
  auto_connect = ``true'
  private = ``false'
  debug = ``false'
  to_char = ``: '
  ops = ``both'
  html = ``nostrip'
  typing_notice = ``false'
  away_devoice = ``true'
  charset = ``none'
  handle_unknown = ``root'
  auto_reconnect = ``false'
  reconnect_delay = ``300'
  save_on_quit = ``true'

Change the character setting to get any local characters to appear as they should. For Norwegian øæå ØÆÅ set the charset to ISO8859-1

 set charset ISO8859-1

Use the program iconv to get a list of charsets available. Run it in a terminal (not in your irc client):

 iconv -l

You probably want to remove HTML from AIM and other users of "fancy" clients:

set strip_html true

Check Bitlbees help for more info.

 help set charset 

Other settings you probably want:

 set auto_connect true
 set auto_reconnect true
 set save_on_quit true

Remember to save your settings (if save_on_quit is set to false)!

 save

How to run your own server

Compiling BitlBee

  1. Unzip the tarball.
  2. Make sure you have an SSL library installed, such as GnuTLS: aptitude install libgnutls-dev
  3. run ./configure, make, make install
  4. run make install-etc to create the default settings, if you don't have any already

/usr/local/sbin//bitlbee /usr/local/etc/bitlbee/bitlbee.conf

Installing a precompiled BitlBee

Get BitlBee version >= 1.0.3:

  • On Debian/Ubuntu: aptitude install bitlbee.
  • On Gentoo Linux: ACCEPT_KEYWORDS="~x86" USE="jabber msn oscar yahoo -debug" emerge bitlbee
  • On RHEL: rpm -ivh bitlbee.rpm

Bitlbee can be started as a separate daemon or be loaded by xinetd or inetd. Use daemon mode only if you will be the only one using it; use inetd or xinetd if the server will be used by more than one user!

Configuration files:

  • /etc/bitlbee/bitlbee.conf
  • /etc/init.d/bitlbee - may specify the port bitlbee listens to, and the RunMode (e.g. -F for forking). Look for BITLBEE_* variables. These settings will override those in bitlbee.conf.
  • /etc/bitlbee/motd.txt
  • /etc/xinetd.d/bitlbee if you're using xinetd

To restart bitlbee after changing its config file:

   sudo /etc/init.d/bitlbee restart

Running a public server

To get a publicly available bitlbee server up and running (using xinetd):

  • Install BitlBee
  • Open port 6667 in your firewall
  • Comment # out disable = no and only_from = localhost in the file /etc/xinetd.d/bitlbee
  • Add bitlbee: ALL to /etc/hosts.allow

Running a private server / restricting access

In /etc/bitlbee/bitlbee.conf<ref>[ , set:

  • DaemonPort to a different port from the default 6667, to make attacks a bit more difficult
  • AuthmMode = Closed
  • AuthPassword - the IRC server password your client will authenticate with (you can use any username you want in your IRC client)

Set only_from in /etc/xinetd.d/bitlbee and bitlbee: in /etc/hosts.allow to your LAN or whatever to restrict access to the service - or simply block the bitlbee port (default 6667) with your firewall.

xinetd

Bitlbee can be used as a stand-alone server or be called using xinetd (manual). You should call it using xinetd, daemon mode only allows one user. Make sure you have configured xinetd correctly and make sure Bitlbee is not disabled (default on Gentoo and other systems) with a line saying

 disable = yes

in the file /etc/xinetd.d/bitlbee. You must (re)start xinetd when you are finished configuring it (/etc/init.d/xinetd restart).

To check the authors bitlbee server, start your favorite irc client and:

 /connect im.everdot.org

This server is compiled with support for jabber, msn, oscar and yahoo.

manual page

What version should I use?

Note that older versions may not support the currently running protocols. For example, the latest version for Debian/Ubuntu is 1.2.3a, which doesn't support the Yahoo Messenger that Yahoo! is running as of 2010-May-15. The current BitlBee version, 1.2.6a, does support the current YM protocol.

You can find the latest stable version of Bitlbee on the download page.

The developers are also releasing development snapshots quite frequently, brave and experienced users are encouraged to use these and reports bugs. You should compile with debugging symbols (+debug) if you choose to use the snapshot releases.

Production systems and public servers should use the latest stable release.

xinetd and ipv6

If you want bitlbee to answer IPv6 connections using xinetd you need to add

 flags = IPv6

to the configuration file (and to all other xinetd services you want IPv6 enabled for that matter)

 /etc/xinetd.d/bitlbee

Example:

 service ircd
 {       
         flags           = IPv6
         socket_type     = stream
         protocol        = tcp
         wait            = no
         user            = nobody
         server          = /usr/sbin/bitlbee
         port            = 6667
         disable         = no
 }

How to talk to your IM friends from a web page

It is very easy to allow users to talk to IM friends from a web page if you already have Bitlbee and a (Apache) web server up and running. Install cgiirc, a Perl/CGI program that lets you use IRC servers from a web browser. Installing it is very straight forward. It can be used to make a chat-room for a website, and more importantly, allow web users to access your Bitlbee server.

Web servers you can use freely:

Support and worshiping

You may thank the kind developers who made Bitlbee on the IRC channel #bitlbee on the IRC network OFTC (irc.oftc.org). You can also request features and ask well-formulated thought-through questions on this channel.

Notes

Links