SBNC

From SHellium Wiki

Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

Contents

Please remember!

A SBNC running on a SHellium shell is only allowed 4 connections, 3 users plus the owner of the shell. Any more than 4 connections will result in your shell account being locked.

Menu

About shroudBNC

shroudBNC is a BNC client like PsyBNC, which keeps you connected even when you disconnect from your IRC client, It works with some scripts like TCL and is easy to configure

Getting shroudBNC

Here are some simple steps to configure it.

In your shell, type

$ wget http://mirror.shroudbnc.info/sbnc-1.2.tar.gz

It will download the source file.

then type

$ tar -xzf sbnc-1.2.tar.gz

then

$ rm -f sbnc-1.2.tar.gz

Now is time to compile the source. Here in shellium you need GCC access to do this, see this for setting the following command up. On IRC (Freenode) type:

/msg bot|shellium getgcc <shellUserName> <reason for GCC>

You will now be moved to the GCC group for 15 minutes (this means you have 15 minutes to edit the BNC config) and kicked off the shell to have it applied.

Log back in to the shell and type:

$ cd sbnc-1.2
$ ./configure
$ make
$ make install

Done, if no error ocurrs type

$ cd ../sbnc

Note: If you have errors while compiling, you can get precompiled version from here

You can optionaly remove the source folder, because you won't need it any more. Now use

$ rm -rf ../sbnc-1.2

You can now run sBNC type

$ ./sbnc

shroudBNC (loader: 1.2 $Revision: 1080 $) - an object-oriented IRC bouncer
Fri Jul 11 10:31:24 2008: Log system initialized.
No valid configuration file has been found. A basic
configuration file can be created for you automatically. Please
answer the following questions:

In the first step you will set the sBNC port, that was set in 'myports'. Example

1. Which port should the bouncer listen on (valid ports are 
in the range 1025 - 65535): 63600

In the second step you will set your user name, that in your ident, before the @, example, for 'Alex-Music'.

2. What should the first user's name be? Alex-Music

In the third step you will set your password, and the forth step you will confirm your password

3. Please enter a password for the first user: <type your password>
4. Please confirm your password by typing it again: <retype your password>

Ok, if finished

Writing main configuration file... DONE
Writing first user's configuration file... DONE
Configuration has been successfully saved. Please restart shroudBNC now.

Now restart ShroudBNC using the following command so it will not spawn more than one process

./sbnc --lpc

Now with your IRC client, connect to shellium.org and the port which you set, when sBNC asks you for the password you need to type

/quote pass yourpass

The password is the same that you set in the step 3 and 4.

Now is time to configure your sBNC... To set a vhost use the below syntax. As an example type

/sbnc set vhost support.team.at.shellium.org

To set your realname type as an example

/sbnc set realname Alex

To set your user modes type as an example

/sbnc set automodes +ixsR

Now you can set the IRC server that sBNC will connect to. To do this use this syntax

/sbnc set server irc.freenode.net:8000

Ok, sBNC will connect the server, if it works, will return as example

<-sBNC> Trying to reconnect to irc.freenode.net:8000 for user Alex-Musicman
<-sBNC> Connection initialized for user Alex-Musicman. Waiting for response...
<-sBNC> You were successfully connected to an IRC server.
<-sBNC> User Alex-Musicman connected to an IRC server.

Done

To see your setting list

/sbnc set

The shroudBNC commands are in /sbnc help.

Howto make sbnc auto identify with nickserv

First do this:

/sbnc nickserv set reply ns


Next:

/sbnc nickserv set password yourepassword

Next:

/sbnc nickserv set warning This nickname is registered and protected. If it is your


If you want to set delay join and other such things, /sbnc nickserv help will give you all you need to know, please set a password.

sBNC with SSL

Unlike psyBNC that creates a SSL certificate upon compilation if the openssl libs are available, sBNC doesn't. To have an encrypted SSL connection with your bouncer you'll have create the certificate yourself.

Create certificate

To create the certificate, go to directory where the sBNC binary is (not the source directory) and create the certificate. sBNC expects to find the files sbnc.crt and sbnc.key there:

 cd ~/sbnc
 openssl genrsa -des3 -out sbnc.key 1024
 openssl req -new -x509 -days $[365 * 5] -key sbnc.key -out sbnc.crt

You will be asked to create a passphrase and to answer some details.

Enable sslport

Turn the bouncer listen port to SSL by editing sbnc.conf in your favorite text editor and then changing:

 system.port=99999

To:

 system.sslport=99999

With this the listen port will use SSL, and no unencrypted port will be available anymore. You could have both encrypted and unencrypted listen ports by having both lines in the configuration, but we only have two ports available here in Shellium.org and it's kinda not logical to use an unencrypted connection if we want an encrypted one. Your choice. Now you can run sbnc with SSL, no special command line options needed.

Remove passphrase

Because sBNC asks for the passphrase of the SSL certificate when it starts, we must run it in foreground (with --foreground command line option) - that's not desirable here. This can be avoided by removing the passphrase from the SSL certificate. If there is no passphrase asked, the sbnc process can go to background as usual. To remove the passphrase execute:

 cp sbnc.key sbnc.key.org
 openssl rsa -in sbnc.key.org -out sbnc.key

Type the passphrase and it's done. Now start sBNC normally, to background and with no child process as explained above:

 ./sbnc --lpc

Connecting with IRC client using SSL

Please look here for information about connecting to your sBNC bouncer using SSL.

Automatically start sBNC on reboot and every X minutes

Open ~/sbnc and create a file called sbncchk.sh with those strings:

#!/bin/sh
SBNCPATH=~/sbnc

if test -r $SBNCPATH/sbnc.pid; then
    SBNCPID=$(cat $SBNCPATH/sbnc.pid)
    if $(kill -CHLD $SBNCPID >/dev/null 2>&1)
    then
	exit 0
    fi
fi
cd $SBNCPATH
./sbnc --lpc &>/dev/null

After let's set execution privyleges for sbncchk.sh with:

chmod +x ~/sbnc/sbncchk

In the end you've to add some strings to your crontab to check if sBNC is running or is crashed, so let's type:

$ crontab -e

and add those stings:

@reboot $HOME/sbnc/sbncchk.sh > /dev/null 2>&1
*/10 * * * * $HOME/sbnc/sbncchk.sh > /dev/null 2>&1

This way every reboot and every 10 minutes the system will check for the execution of your BNC.

Personal tools
Namespaces
Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox