Setting up the Nefarious IRC Server Software (ircd)

ssh into your server.

Before we continue, we'd like to make sure you have the packages needed for a successful install. So be sure you have the packages below installed on your box:

libssl-dev (for enabling ssl -- openssl-devel on redhat)
autoconf   (to avoid errors when running make)

The named packages above can be fetched (on a Debian based system) with apt-get:

sudo apt-get install git openssl libssl-dev autoconf automake flex libpcre3-dev byacc gawk

Note: The names of the packages above may vary, depending on your distribution.


git clone

The system will begin to download the latest version of the nefarious ircu.

With that said, we now move on to getting the server up and running.

cd nefarious2

For your own convenience, we recommend using one centralized directory when running the configure script (it's up to you though). ssl is enabled now by default. The following will install everything into $HOME/ircd/

./configure --libdir=$HOME/ircd --mandir=$HOME/ircd --bindir=$HOME/ircd

Once that is done, run:



make install

If everything runs smoothly you should now have an ircd directory:

cd /home/user/ircd

Then fetch the ircd.conf to the ircd directory:

wget -O ircd.conf

You'll have to edit the configuration file a bit (for simplicity, nano is used in this example):

nano -w ircd.conf

Change the options in the General and Admin sections.

Where YourNumeric will be changed to a number we give you before you link.

You might also want to give yourself an oper block, otherwise you can't oper up. Now save the file.

You are now ready to start your IRC server, run:


That will start the ircd. Test it by connecting to your server. Installing the cronjobs needed Cron is the system scheduled jobs manager. We generally run 3 jobs to help maintain the ircd. To edit the cron list, login with the account on which you want the scheduled jobs to run under, and run:

crontab -e

The syntax of the file is as follows:

  # Min Hour  Day   Month   DOW
  */5   *       *       *          *      /path/to/

read the unix manual to crontab for more information.


iauthd provides for DNSBL blocking to protect us from drones. This script is include in the source nefarious2 was created when cloning the git repository to your server.


You will need to install some perl dependencies for this script to run.


 sudo apt-get install libpoe-perl libpoe-component-client-dns-perl libterm-readkey-perl libfile-slurp-perl libtime-duration-perl


 yum install perl-POE perl-POE-Component-Client-DNS perl-TermReadKey perl-slurp perl-Time-Duration


ports dns/p5-POE-Component-Client-DNS devel/p5-Time-Duration devel/p5-File-Slurp devel/p5-Term-ReadKey


cpan install Term::ReadKey POE::Component::Client::DNS File::Slurp Time::Duration


Simply copy the script from the /nefarious2/tools/ into the same directory as your ircd.conf file resides in order to make configuration easier.

 Example: cp tools/ /home/your_ircd/ircd/lib/

Now edit your ircd.conf file and add the following block:

 IAuth {
     program = "/usr/bin/perl" "" "-v" "-d" "-c" "ircd.conf";

Now, save the file and /rehash. I all goes well you can verify that the script is functional by running the following command:

 /stats iauth

This should show something similar to this: :Up since Thu Jun 25 06:06:34 2015 (20 hours and 47 minutes) :Cache size: 837/2048 :Total Passed: 197 :Total Rejected: 14 (2,3,4,5,6,7,9): 3 (2,3,5,6,7,8,9,10,13,14,15): 5 (4): 17 (1,2,3,5): 0 (2): 0 (2): 0 (2): 10 (2): 10
 iauth: End of /STATS report         

If you would like to learn more about iauth please visit our GitHub Wiki

Please install the following cron jobs:


gitsync updates your server every hour with the latest k: lines, features, and server connection info. It is required. There is a copy in nefarious2/tools/linesync/ it is best to symlink this to your ircd.conf directory, for example: ln -s /home/your/nefarious2/tools/linesync/ /home/your/ircd/ so it is easy to run and keep up to date.

You must have an SSH key setup for the user that runs ircd. This is normally in ~/.ssh/ if not, run ssh-keygen and configure a key with empty password. Then, get an admin a copy of contents so he can add it to authorized access list of gitsync repository.

Once you have been given access, you must initialize the repository: ./ -i

If that works, you'll have our server list and additions added to your ircd.conf, and a new certificate (.pem) file.

0 0 * * * /home/user/ircd/ -s /home/user/.ssh/id_rsa -c /home/user/ircd/ircd.conf /home/user/ircd/

This gem checks if the irc server is running, and if it isnt, starts it up. This will keep the ircd up after reboots, or in the case of a crash. Create the file using a text editor, pasting this code in:

# don't start the server if it is already running
procs=`ps x`
if echo "$procs" | grep /home/user/ircd/ircd > /dev/null; then

(be careful to use the right kind of `` ticks!)

Make the script executable:

chmod a+x

And add a cron job:

*/5 * * * * /home/user/

With these cronjobs installed, you are now ready to link your server to the network.