Table of Contents

ZNC install for network Administrators

This is a guide for IRC Network Administrators. If you just want to connect to AfterNET's ZNC bouncer, go to znc

If you use X3 with ldap support (Or any services with ldap support) you can host a ZNC bouncer for all your users to use, by using ZNC's cyrusauth module. Here is how we build ZNC for afternet:

Install saslauthd

START=yes
MECHANISM="ldap"
ldap_servers: ldaps://yourldapserver.domain
ldap_search_base: ou=Users,dc=yourdomain,dc=org
ldap_filter: (uid=%u)
#ldap_tls_cacert_file: /etc/ssl/yourcertificate.cer
ldapsearch -D "uid=youruid,ou=Users,dc=yourdomain,dc=org" -w yourpassword -H ldaps://ldapservername -b "ou=Users,dc=yourdomain,dc=org" -s sub "(objectclass=*)"

Install ZNC

Assuming a debian 8 (jessie) base system:

Setup IRCD

WebIRC {
  description = "znc";
  host = "*@zncip";
  pass = "crypted password";
};

* Except block to protect znc from flood limits:
Except {
  host = "*@zncip";
  gline = yes;
  rdns = yes;
  ipcheck = yes;
  targetlimit = yes;
};

Security

I run this script after make install to disable a bunch of the plugins:

#!/bin/bash

RM='/bin/rm -v'
echo "Lets delete modules we dont trust or need for security!"

#Lets remove unsafe modules!
#keep#lib/znc/adminlog.so
#keep#lib/znc/alias.so
#keep#lib/znc/autoattach.so
#keep#lib/znc/autocycle.so
#keep#lib/znc/autoop.so
#keep#lib/znc/autoreply.so
#keep#lib/znc/autovoice.so
#keep#lib/znc/awaynick.so
$RM lib/znc/awaystore.so
#keep#lib/znc/block_motd.so
#keep#lib/znc/blockuser.so
$RM lib/znc/bouncedcc.so
#keep#lib/znc/buffextras.so
$RM lib/znc/certauth.so
$RM lib/znc/cert.so
# ADD? #lib/znc/chanfilter.so
#keep#lib/znc/chansaver.so
#keep#lib/znc/clearbufferonmsg.so
# ADD? #lib/znc/clientaway.so
# ADD? #lib/znc/clientbuffer.so
#keep#lib/znc/clientnotify.so
$RM lib/znc/controlpanel.so
$RM lib/znc/crypt.so
#keep#lib/znc/ctcpflood.so
#keep#lib/znc/cyrusauth.so
$RM lib/znc/dcc.so
#keep#lib/znc/disconkick.so
#keep#lib/znc/fail2ban.so
#keep#lib/znc/flooddetach.so
#keep#lib/znc/identfile.so
$RM lib/znc/imapauth.so
#keep#lib/znc/keepnick.so
#keep#lib/znc/kickrejoin.so
#keep#lib/znc/lastseen.so
$RM lib/znc/listsockets.so
#keep#lib/znc/log.so
$RM lib/znc/missingmotd.so
#$RM lib/znc/modperl
$RM lib/znc/modperl.so
$RM lib/znc/modperl/startup.pl
$RM lib/znc/modperl/ZNC.pm
$RM lib/znc/modperl/ZNC.so
#$RM lib/znc/modpython
$RM lib/znc/modpython.so
$RM lib/znc/modpython/znc_core.py
$RM lib/znc/modpython/_znc_core.so
$RM lib/znc/modpython/znc.py
#keep#lib/znc/modules_online.so
$RM lib/znc/nickserv.so
$RM lib/znc/notes.so
#keep#lib/znc/notify_connect.so
# ADD? #lib/znc/partdetach2.cpp
#keep#lib/znc/partyline.so
#keep#lib/znc/perform.so
$RM lib/znc/perleval.pm
$RM lib/znc/pyeval.py
$RM lib/znc/q.so
$RM lib/znc/raw.so
# ADD? #lib/znc/playback.so
# ADD? #lib/znc/privmsg_auto.so
#keep#lib/znc/route_replies.so
$RM lib/znc/sample.so
#keep#lib/znc/sasl.so
$RM lib/znc/savebuff.so
$RM lib/znc/schat.so
$RM lib/znc/send_raw.so
#keep#lib/znc/shell.so
#keep#lib/znc/simple_away.so
# ADD? #lib/znc/snomask.so
#keep#lib/znc/stickychan.so
#keep#lib/znc/watch.so
#keep#lib/znc/webadmin.so