Installing And Configuring sbnc

From SwiftIRC Wiki
Jump to: navigation, search

Most BNCs that you see around SwiftIRC run on a program called ShroudBNC. sBNC is amongst the most popular Bouncers, and this is no coincidence as it is one of the easiest to use. This software is best run on a Linux system and does not yet have any Windows versions; this guide is setting it up on VPS running Debian 5.0, although it should be similar for most Linux-based operating systems. Please remember that this is a basic guide, and if you plan on running a BNC service, there are alterations you will want to make.

Contents

Retrieving the Source

Before you “wget” the source, you need to make some preparations. Log in to where you will be running the Bouncer.

REMEMBER: Before going any further, you need to make sure you have TCL installed on the VPS. If you don’t install it now then you will have to restart the installation to get it to work.

 apt-get install tcl

sBNC advises you not to run it on root, so if (as on most VPS’) you are logged in as root, you will need to add another user to run the process on.

 adduser test1

After using this bash command it will ask you for a few details. You only need to fill in the two passwords as you can press enter for details that follow it. You can now change to the new user by typing:

 su test1 (Replacing test1 with the user you made)

Now that you’re on the added user you can download the tarball needed:

 wget http://www.shroudbnc.info/redmine/attachments/download/7/sbnc-1.2.tar.gz 

And extract it:

 tar -xzvf sbnc-1.2.tar.gz

Configuring sBNC1.2

Now that you’ve downloaded and untarred the files needed, you can set about configuring them. First change the directory:

 cd
 cd sbnc-1.2

Now configure it:

 ./configure

It should now go through a long stage of checking the files, and checking your build zone. If this stage is only small, and returns a lot of negative results you may need to go back to the beginning and find where you’ve gone wrong.

Now use the make commands. These may take a few minutes. Depending on where you’re running the program, you may need to use gmake instead.

 make
 make install

Getting sBNC1.2 Online

Now go back to the home directory, and change to the sbnc directory.

 cd
 cd sbnc

You’re now ready to set options:

 ./sbnc

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

Pick a port, and try not to forget it.

"5555"

“2. What should the first user's name be?”

This will be your first login user, and default admin.

“Lexy”

“3. Please enter a password for the first user:”

This is the password for our first login user.

“testpass”

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

Now you need to restart the Bouncer by typing this in the sbnc directory:

 ./sbnc  --lpc
 
 shroudBNC (loader: 1.2 $Revision: 1080 $) - an object-oriented IRC bouncer
 Daemonizing... DONE

Ok, your server is now up and running – although you’re nowhere near complete! You can now connect to the server in your IRC client using:

 /server SERVERIP:PORT FIRSTUSER:PASS

So in our example, that would be:

 /server IP:5555 Lexy:testpass

Setting up your sBNC

You’ve connected to your BNC, and you’re an admin by default. You can do /sbnc help for a list of commands. sBNC has the option to add TCL scripts, and if you’re running your BNC on SwiftIRC there are a few TCL scripts you should add. You can add scripts by uploading them to the directory in which you installed the sBNC program, which by default is /home/USER/sbnc. sBNC comes with a custom list of scripts that are not already on the Bouncer. To see these, go to the directory /home/USER/sbnc, and to edit which scripts are used, you need to add the name to the sbnc.tcl file in the same directory. To see a list of scripts you can use, go to the scripts directory.

On SwiftIRC, the rules state that users must not be able to change their vhost freely, which means you must deploy a TCL module lock.tcl.

I find Khobbit's website a good resource for scripts to use. Beside each script is a command that can be used to simplify adding TCL scripts to your VPS, using /sbnc tcl which allows you to perform TCL commands. Example:

 /sbnc tcl catch {exec wget --output-document=scripts/offlinereply.tcl http://www.khobbits.co.uk/sbnc/sbnc/offlinereply.tcl} 
 o; foreach l [split $o \n"] { putlog $l }; rehash;

Here is an example of how your sbnc.tcl file should look.

 source "scripts/alltools.tcl"
 source "scripts/namespace.tcl"
 source "scripts/timers.tcl"
 source "scripts/misc.tcl"
 source "scripts/variables.tcl"
 source "scripts/pushmode.tcl"
 source "scripts/channel.tcl"
 source "scripts/bind.tcl"
 source "scripts/usys.tcl"
 source "scripts/socket.tcl"
 source "scripts/botnet.tcl"
 source "scripts/iface2.tcl"
 source "scripts/ifacecmds.tcl"
 source "scripts/partyline.tcl"
 source "scripts/lock.tcl"
 source "scripts/tcl.tcl"
 source "scripts/offlinereply.tcl"

To update any changes to the file, do /sbnc tcl :rehash on the Bouncer.

FAQ

Q. /sbnc tcl :rehash returns Unknown command.

A. You have not installed TCL properly on the server that you’re running sBNC on. Some providers may limit the ability to use “apt-get install tcl”, therefore you may need to download the source and compile it yourself. Once it is sorted you will need to delete and redo the whole installation for it to work correctly.


Q. How do I add scripts?

A. You need to add “source scripts/script.tcl” to sbnc.tcl. If you want to add custom scripts, then you’ll need to download them into the /scripts directory and then add the source to sbnc.tcl.


Q. How do I set up bvhosts?

A. Although not needed, it is recommended that you use an IPv6 range. You can get your own at Hurricane Electric, which offers a free tunnel broker service if your VPS does not have native IPv6. There are instructions on the website on setting up the tunnel on your VPS. Next, you'll have to find the domain to use as your bvhost. afraid.org is a free DNS service that has a repository of domains that you can use. After setting up an account, you'll need to find the domain you want and add an AAAA zone record that points to the IPv6 address that you want to use.


Q. Where can I see what the rules are regarding BNCs are on SwiftIRC?

A. See the SwiftIRC BNC provider rules here.


Q. My users are quitting with message Ping Timeout, why is this?

A. This is probably because your IPv6 tunnel has for some reason stopped, or has become unstable – or the IPv6 on the IRC server is down.


Q. I get connection refused when trying to connect to a server on my BNC, why is that?

A. You will get a connection refused error if the IRC server you’re connecting to does not have IPv6 enabled. To see a list of IPv6 enabled SwiftIRC servers, click here.


Q. My bvhosts don’t work, why is this?

A. If the bvhost has had time to be added both sides, reverse and forward then you’ll need to check that both of the records are the same and correct. If they are both correct and they have both had time to sort themselves out then you should check that the IPv6 is added to your VPS. If all else fails try a different IPv6 address. If the IP address does not resolve, it may have been cached on the server you are connected to.


Q. My IPv6 address has been banned from SwiftIRC, why?

A. This is probably because the bvhost you’ve chosen is against the SwiftIRC rules. You should re-read the rules. You will still be able to connect on a different IP address, provided you don't have your whole IPv6 range banned.


Q. How do I get rid of the ~ in my BNC user's idents?

A. You need to set up Oidentd. A guide on how to do this can be found here. Note that oidentd is not always installed on your VPS, so you may need to install it yourself.




 This page was created by SwiftIRC user Alexandra.