This blogpost is a guide on how to setup IRC server on FreeBSD 11 64 bit and we choose InspIRC as it met our requirements which are:

  1. Only LDAP authenticated Employee should be able to login and chat
  2. The communication should be protected by SSL protocol
  3. Channel logs are to be saved on the server.(Not covered in this post)

There is a long list of IRC Server’s software list, please refer to this wiki page.

Installation of Inspircd using pkg

Install the stock binary of Inspircd from pkg, upon successful installation, we can check the modules that come with it.

As we can see in the above output with the binary installation using pkg the necessary modules are not enabled by default especially LDAP and SSL modules which require for our scenario. To have the modules of our choice we can go ahead with installation from source using ports.

Installation from source using ports

Know the location and change to the port directory of inspircd

We have to configure the compile options to enable necessary module:

In the TUI prompt, select LDAP and SSL for our requirements


When the installation completes a successful message will be displayed and the package gets registered in pkg database.

To check whether the selected modules have been installed correctly run this command

Configuring Inspircd

In case the daemon is not starting check the log at

If the error is related to die value then edit the conf file

to search for die value & comment out lines wherever you find ‘die’ word and then Restart the inspirc demon

LDAP Configuration

There is a module file

where we have to enable the ldap module “m_ldapauth.so”. The Ldap settings will be:

Enter the details of your LDAP server and the baserdn

Do remember to include the module file in inspircd.conf file

Since all the modules are mentioned there. Thus if file is not included the modules will not be loaded after restart of service.

Restarting the inspircd will load the m_ldapauth.so and now it should connect with ldap details from the chat clients.

To check if we are getting the details of user from ldap server:

SSL Configuration

We will be using the Let’s encrypt generated certificates. Copy or generate the let’s encrypt files cert.pem, chain.pem, fullchain.pem and privkey.pem to directory: /usr/local/etc/inspircd/sslcerts.

Now we have to generate the dhparam key which is of the same bits as the certificates are and place it along with other generated certificates and keys.

Enable the ssl module in modules.conf

And configure the SSL in inspircd.conf for openssl

For OpenSSL give the path of certificates and dhParam file

For GNUTLS give the path of certificates and dhParam file

Mention openssl in ssl section of bind if you are using openssl else gnutls

Restart the inspircd daemon to load the ssl module & simultaneously check the logs

The port it listens will be TCP 6697, which can be changed if required.

Connection Configuration

When Inspirc server is up and running we faced an issue i.e, more than 3 users were not able to connect to IRC server, to overcome the restriction we can make the following changes.

Increase the local connections limit

under the sections CONNECTION CONFIGURATION, PERFORMANCE CONFIGURATION respectively.

Change the motd file

Change the motd.txt file and paste the banner message you wish the users to see.

Try to connect to your IRC server on 6697 port and enabling SSL while using the LDAP credentials.

HAPPY CHATTING