How to install InspIRCd

Step 1 - Install Packages

In this step, we will install some RPM packages. The packages are for the module manager (based on perl) and packages for the InspIRCd installation. Log in to the server and switch to root with the sudo command:

ssh inspircd@192.168.1.102
sudo su

Install the Perl extensions so we can use module manager later.

yum -y install perl perl-libwww-perl perl-Crypt-SSLeay perl-LWP-Protocol-https

Then install gnutls and the gcc compiler for InspIRCd installation:

yum -y install gcc-c++ gnutls gnutls-devel gnutls-utils pkgconfig wget

 Step 2 - Add a new system user




We want to run InspIRCd as irc user, so we need to create a new account on the system. Add the new user with the useradd command below:

useradd -m -s /bin/bash irc

-m = create a home folder for the user.
-s = define the shell - we use the /bin/bash shell.

Step 3 - Install InspIRCd

From the root user, switch to the new account irc:

su - irc

Now we are in the home directory of the irc user, download the inpircd source code with the wget command, and extract it:

wget https://github.com/inspircd/inspircd/archive/v3.4.0.tar.gz
tar -xzvf v3.4.0.tar.gz

Go to the inspircd directory:

cd inspircd-3.4.0/

Enable the gnutls support for inspIRCd:

./configure --enable-extras=m_ssl_gnutls.cpp

And then install it, we will install InspIRCd on the home directory "":

./configure

You will be asked for the installation directory, we will use "/home/irc/inspircd/" as the installation directory. Type the complete path of the directory and press y or enter.

Build ircd

Now run:

make
make install

Wait for installation process to finish, then remove the inspircd-2 directory:

cd ~/
rm -rf inspircd-3.400

Step 4 - Configure InspIRCd

If all installation is done, go to the inspircd directory.

cd inspircd/

Create a new "cert" directory for the certificate files and create new certificates with the certtool command - or you can use openssl to generate it.

mkdir cert; cd cert
certtool --generate-privkey --outfile key.pem
certtool --generate-self-signed --load-privkey key.pem --outfile cert.pem

Now we have a certificate and key file in the cert directory:

cert.pem
key.pem

Next, go to the conf directory and create a new configuration file inspircd.conf:

cd ~/inspircd/conf/
vi inspircd.conf

Paste the configuration below:


<config format="xml">
<define name="bindip" value="1.2.2.3">
<define name="localips" value="&bindip;/24">

####### SERVER CONFIGURATION #######

<server
        name="chat.inspircd.co"
        description="Welcome to inspird World"
        id="97K"
        network="chat.inspircd.co">


####### ADMIN INFO #######

<admin
       name="jun naruse"
       nick="naruse"
       email="naruse@inspircd.co">

####### PORT CONFIGURATION #######

<bind
      address=""
      port="6697"
      type="clients"
      ssl="gnutls">

<module name="m_ssl_gnutls.so">
<gnutls certfile="/home/irc/inspircd/cert/cert.pem" keyfile="/home/irc/inspircd/cert/key.pem" priority="NORMAL:-MD5" hash="sha1">

<bind
       address=""
       port="7000"
       type="servers">

####### DIE and RESTART CONFIGRATION #######

<power
       diepass="mypassword"
       restartpass="mypassword">

####### CONNECT CONFIGURATION #######

<connect deny="3ffe::0/32" reason="The 6bone address space is deprecated">

<connect
         name="main"
         allow="*"
         #maxchans="30"
         timeout="10"
         pingfreq="120"
         hardsendq="1M"
         softsendq="8192"
         recvq="8K"
         threshold="10"
         commandrate="1000"
         fakelag="on"
         localmax="10"
         globalmax="10"
         useident="no"
         limit="5000"
         modes="+x">

####### CIDR CONFIGURATION #######

<cidr
      ipv4clone="32"
      ipv6clone="128">

####### INCLUDE FILE #######

<include file="conf/opers.conf">
#<include file="conf/examples/links.conf.example">

####### MISCELLANEOUS CONFIGURATION #######

<files motd="conf/motd.txt" rules="conf/rules.txt">

####### MAXIMUM CHANNELS #######

<channels
          users="20"
          opers="60">

####### PID FILE #######

<pid file="/home/irc/inspircd/inspircd.pid">

####### BANLIST LIMITS #######

<banlist chan="#largechan" limit="128">
<banlist chan="*" limit="69">

####### SERVER OPTIONS #######

<options
         prefixquit="Quit: "
         suffixquit=""
         prefixpart="&quot;"
         suffixpart="&quot;"
         syntaxhints="no"
         cyclehosts="yes"
         cyclehostsfromuser="no"
         ircumsgprefix="no"
         announcets="yes"
         allowmismatch="no"
         defaultbind="auto"
         hostintopic="yes"
         pingwarning="15"
         serverpingfreq="60"
         defaultmodes="nt"
         moronbanner="You're banned! Email yone@natsu.com with the ERROR line below for help."
         exemptchanops="nonick:v flood:o"
         invitebypassmodes="yes"
         nosnoticestack="no"
         welcomenotice="yes">


####### PERFORMANCE CONFIGURATION #######

<performance
             netbuffersize="10240"
             somaxconn="128"
             limitsomaxconn="true"
             softlimit="12800"
             quietbursts="yes"
             nouserdns="no">

####### SECURITY CONFIGURATION #######

<security
          announceinvites="dynamic"
          hidemodes="eI"
          hideulines="no"
          flatlinks="no"
          hidewhois=""
          hidebans="no"
          hidekills=""
          hidesplits="no"
          maxtargets="20"
          customversion=""
          operspywhois="no"
          restrictbannedusers="yes"
          genericoper="no"
          userstats="Pu">

####### LIMITS CONFIGURATION #######

<limits
        maxnick="31"
        maxchan="64"
        maxmodes="20"
        maxident="11"
        maxquit="255"
        maxtopic="307"
        maxkick="255"
        maxgecos="128"
        maxaway="200">

####### LOGGING #######

<log method="file" type="* -USERINPUT -USEROUTPUT" level="default" target="logs/ircd.log">

####### WHOWAS OPTIONS #######

<whowas
        groupsize="10"
        maxgroups="100000"
        maxkeep="3d">

####### BAN OPTIONS #######

<badip
       ipmask="192.0.2.69"
       reason="No porn here thanks.">

<badnick
         nick="ChanServ"
         reason="Reserved For Services">

<badnick nick="NickServ" reason="Reserved For Services">
<badnick nick="OperServ" reason="Reserved For Services">
<badnick nick="MemoServ" reason="Reserved For Services">

<badhost
         host="*@banneduser.example.net">

<badhost host="root@*" reason="Don't IRC as root!">
<badhost host="*@198.51.100.0/24" reason="This subnet is bad.">

# exception: Hosts that are exempt from [kgz]lines.
<exception
           host="*@ircop.example.com"
           reason="Oper's hostname">

####### INSANE BAN OPTIONS #######

<insane
        hostmasks="no"
        ipmasks="no"
        nickmasks="no"
        trigger="95.5">

Edit the server configuration block for your server:

name: Hostname or FQDN of the server

description: Your server description

id: SID of the server - 2 number with 1 letter

network: name of your network

Edit the admin info.

name: the real name

nick: nick used on IRC network

email: email of admin

Edit the bind address for port and the ssl configuration.

address: server IP address - not a hostname

port: port usage

type: clients or servers type

ssl: encryption used - openssl or gnutls

edit die and restart configuration.

This configuration is used to set the password to restart or shutdown for trusted ircops.

diepass="mypassword"

restartpass="mypassword"

Save the file and exit.

Now create new file opers.conf for the operator configuration.

vi opers.conf

Paste the oper configuration below:

<class
     name="Shutdown"
     commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOADMODULE GLOADMODULE GUNLOADMODULE GRELOADMODULE"
     usermodes="*"
     chanmodes="*">

<class name="SACommands" commands="SAJOIN SAPART SANICK SAQUIT SATOPIC SAKICK SAMODE OJOIN">
<class name="ServerLink" commands="CONNECT SQUIT RCONNECT RSQUIT MKPASSWD ALLTIME SWHOIS JUMPSERVER LOCKSERV UNLOCKSERV" usermodes="*" chanmodes="*" privs="servers/auspex">
<class name="BanControl" commands="KILL GLINE KLINE ZLINE QLINE ELINE TLINE RLINE CHECK NICKLOCK NICKUNLOCK SHUN CLONES CBAN CLOSE" usermodes="*" chanmodes="*">
<class name="OperChat" commands="WALLOPS GLOBOPS" usermodes="*" chanmodes="*" privs="users/mass-message">
<class name="HostCloak" commands="SETHOST SETIDENT SETIDLE CHGNAME CHGHOST CHGIDENT" usermodes="*" chanmodes="*" privs="users/auspex">

<type
    name="NetAdmin"
    classes="SACommands OperChat BanControl HostCloak Shutdown ServerLink"
    vhost="netadmin.inspircd.co"
    modes="+s +cCqQ">

<type name="GlobalOp" classes="SACommands OperChat BanControl HostCloak ServerLink" vhost="ircop.inspircd.co">
<type name="Helper" classes="HostCloak" vhost="helper.inspircd.co">

####### OPERATOR CONFIGURATION #######

<oper
      name="naruse"
      password="mypassword"
      host="brain@dialup15.isp.test.com *@localhost *@example.com *@*"
      type="NetAdmin">

Save the file and exit.

Eedit the oper config as follows:

name: name used on the net

password: password to gain the oper

host: define your host, if you want to all host or IP can gain the oper access, define as "*@*".

type: type of the operator - NetAdmin, Helper, GlobalOp.

Next, copy the samples of motd and rules file from the examples directory.

cp examples/motd.txt.example motd.txt
cp examples/rules.txt.example rules.txt

Then create the inspircd configuration, you have to create a new file links.conf for the services configuration. We will use anope services.

vi links.conf

Paste configuration below:

<link name="services.inspircd.co"
      ipaddr="127.0.0.1"
      port="7000"
      sid="3AX"
      allowmask="127.0.0.0/8"
      sendpass="iamalive"
      recvpass="iamalive">

<uline server="services.inspircd.co" silent="yes">

Save and exit.

Then copy the modules configuration from examples directory.

cp examples/modules.conf.example modules.conf

edit modules.conf and uncomment the modules below:

m_alias - line 65
m_chghost.so - line 463
m_customprefix - line 628
m_globops - line 814
m_hidechans - line 842
m_services_account - line 1630
m_svshold.so - line 1795
m_spanningtree - line 1902

Save and exit.

And finally, go back to the inspircd directory, and then start the inspircd.

cd ~/inspircd/
./inspircd start

Start ircd

If you want to check the inspircd port, you can use the netstat command below:

netstat -plntu

You can see port 6697 and 7000 opened.

Inspircd has been successfully installed.

  • install InspIRCd
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

InspIRCd commands

InspIRCd Commands This page only lists core commands. For details on the commands of a specific...

How to install InspIRCd

InspIRCd is a modular Internet Relay Chat (IRC) server written in C++ for Linux, BSD, Windows and...

InspIRCd Modules

  Module List This is a complete list of all modules that ship with InspIRCd. If you have...

How to build your own InspIRCd IRC Server and Anope

InspIRCd is a modern and fast IRC server and one of the few IRC server applications that provides...

Powered by WHMCompleteSolution