Install and configure znc as an IRC Bouncer
This tutorial is dedicated for installing and creating znc in a Debian VPS as an IRC Bouncer. Before proceeding with this tutorial, please read your provider TOS, are they allowing you to run IRC related service ( IRC Daemon/IRC Bouncer/ IRC Bot, etc.) or not.
ZNC is the simple but nice IRC Bouncer. IRC Bouncer is a software which keeps connection active to an IRC server. This would be usefull te keep your nick as an OP ( Operator ) or keep your nick stay seems Online in an IRC Channel.
For connecting to the znc, you can use :
- /server znc.server port username:password
As for this tutorial, I’m installing and running znc in my Prometeus/Iperweb VPS.
- Creating a user for znc ( do not run znc as root):
# adduser username
root@srv:~# adduser zncuser Adding user `zncuser' ... Adding new group `zncuser' (1001) ... Adding new user `zncuser' (1001) with group `zncuser' ... Creating home directory `/home/zncuser' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for zncuser Enter the new value, or press ENTER for the default Full Name []: ZNC User Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
- Installing ZNC
# apt-get install znc
root@srv:~# apt-get install znc Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libidn11 whois libltdl7 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libc-ares2 libperl5.10 tcl8.5 znc-extra znc-perl znc-tcl Suggested packages: tclreadline The following NEW packages will be installed: libc-ares2 libperl5.10 tcl8.5 znc znc-extra znc-perl znc-tcl 0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/3884 kB of archives. After this operation, 10.3 MB of additional disk space will be used. Do you want to continue [Y/n]? Selecting previously deselected package libperl5.10. (Reading database ... 25168 files and directories currently installed.) Unpacking libperl5.10 (from .../libperl5.10_5.10.1-17squeeze3_i386.deb) ... Selecting previously deselected package tcl8.5. Unpacking tcl8.5 (from .../tcl8.5_8.5.8-2_i386.deb) ... Selecting previously deselected package libc-ares2. Unpacking libc-ares2 (from .../libc-ares2_1.7.3-1squeeze1_i386.deb) ... Selecting previously deselected package znc. Unpacking znc (from .../archives/znc_0.092-3_i386.deb) ... Selecting previously deselected package znc-extra. Unpacking znc-extra (from .../znc-extra_0.092-3_i386.deb) ... Selecting previously deselected package znc-perl. Unpacking znc-perl (from .../znc-perl_0.092-3_i386.deb) ... Selecting previously deselected package znc-tcl. Unpacking znc-tcl (from .../znc-tcl_0.092-3_i386.deb) ... Processing triggers for man-db ... Setting up libperl5.10 (5.10.1-17squeeze3) ... Setting up tcl8.5 (8.5.8-2) ... Setting up libc-ares2 (1.7.3-1squeeze1) ... Setting up znc (0.092-3) ... Setting up znc-extra (0.092-3) ... Setting up znc-perl (0.092-3) ... Setting up znc-tcl (0.092-3) ...
- Login as the new user
- Configure the znc :
# znc --makeconf
$ znc --makeconf [ ** ] Building new config [ ** ] [ ** ] First lets start with some global settings... [ ** ] [ ?? ] What port would you like ZNC to listen on? (1 to 65535): 12345 [ ?? ] Would you like ZNC to listen using SSL? (yes/no) [no]: [ ?? ] Would you like ZNC to listen using ipv6? (yes/no) [no]: [ ?? ] Listen Host (Blank for all ips): [ ** ] [ ** ] -- Global Modules -- [ ** ] [ ?? ] Do you want to load any global modules? (yes/no): no [ ** ] [ ** ] Now we need to setup a user... [ ** ] [ ?? ] Username (AlphaNumeric): zncuser [ ?? ] Enter Password: [ ?? ] Confirm Password: [ ?? ] Would you like this user to be an admin? (yes/no) [yes]: [ ?? ] Nick [zncuser]: znc [ ?? ] Alt Nick [znc_]: znc_ [ ?? ] Ident [znc]: znc [ ?? ] Real Name [Got ZNC?]: ZNC [ ?? ] VHost (optional): [ ?? ] Number of lines to buffer per channel [50]: [ ?? ] Would you like to keep buffers after replay? (yes/no) [no]: [ ?? ] Default channel modes [+stn]: [ ** ] [ ** ] -- User Modules -- [ ** ] [ ?? ] Do you want to automatically load any user modules for this user? (yes/no): no [ ** ] [ ** ] -- IRC Servers -- [ ** ] [ ?? ] IRC server (host only): irc.bsie.net [ ?? ] [irc.bsie.net] Port (1 to 65535) [6667]: [ ?? ] [irc.bsie.net] Password (probably empty): [ ?? ] Does this server use SSL? (probably no) (yes/no) [no]: [ ** ] [ ?? ] Would you like to add another server? (yes/no) [no]: [ ** ] [ ** ] -- Channels -- [ ** ] [ ?? ] Would you like to add a channel for ZNC to automatically join? (yes/no) [yes]: [ ?? ] Channel name: #help [ ?? ] Would you like to add another channel? (yes/no) [no]: [ ** ] [ ?? ] Would you like to setup another user? (yes/no) [no]: [ ok ] Writing config [/home/erawanarifn/.znc/configs/znc.conf]... [ ** ] [ ** ] To connect to this znc you need to connect to it as your irc server [ ** ] using the port that you supplied. You have to supply your login info [ ** ] as the irc server password like so... user:pass. [ ** ] [ ** ] Try something like this in your IRC client... [ ** ] /server <znc_server_ip> 12345 zncuser:<pass> [ ** ] [ ?? ] Launch znc now? (yes/no) [yes]: [ ok ] Opening Config [/home/erawanarifn/.znc/configs/znc.conf]... [ ok ] Binding to port [12345] using ipv4... [ ** ] Loading user [zncuser] [ ok ] Adding Server [irc.bsie.net 6667]... [ ok ] Forking into the background... [pid: 7470] [ ** ] ZNC 0.092+deb3 - http://znc.sourceforge.net
- Your znc is ready now.
Try to connect to your znc and configure it as needed via web browser :http://znc.ip.address:port
or
Connect to your znc via IRC Client
/server znc.ip.address port username:password
and type /znc and help
Member discussion