Torrent Invites! Buy, Trade, Sell Or Find Free Invites, For EVERY Private Tracker! HDBits.org, BTN, PTP, MTV, Empornium, Orpheus, Bibliotik, RED, IPT, TL, PHD etc!



Results 1 to 5 of 5
Like Tree7Likes
  • 4 Post By Ronin21
  • 3 Post By Ronin21

Thread: Install & Configuring an IRC Bouncer (ZNC) on Linux

  1. #1
    Donor
    Ronin21's Avatar
    Reputation Points
    139211
    Reputation Power
    100
    Join Date
    Apr 2014
    Posts
    2,450
    Time Online
    207 d 15 h 10 m
    Avg. Time Online
    1 h 21 m
    Mentioned
    916 Post(s)
    Quoted
    560 Post(s)
    Liked
    3610 times
    Feedbacks
    135 (100%)

    Install & Configuring an IRC Bouncer (ZNC) on Linux

    This is a guide to installing the ZNC IRC Bouncer. The guide assumes you have a fair level of competency with Linux software and command-line tools but having said that nothing done here is very difficult.

    NOTE: If you have ZNC installed and just want to configure and connect to irc servers and start joining channels and going idle then skip this entire process and go for the second section, the configurations.

    A Bouncer (BNC) is an IRC term for software that acts as a proxy between you and an IRC server. You can read more about the BNC concept over at

    Wikipedia - https://en.wikipedia.org/wiki/BNC_%28software%29

    And there is also the invaluable

    ZNC Wiki - http://wiki.znc.in/ZNC

    which is an excellent reference.

    ZNC is the best BNC software that exists. There are several other BNC programs including irssi, psyBNC, ShroudBNC, BNC and Night Light. Feel free to check them out but I haven't used better software than ZNC.


    Using Ubuntu/Debian

    Other packages you will need for compiling ZNC include: libperl-dev, libc-ares2, libc-ares-dev & pkg-config. If these are not installed on your system already you will need to be root in order to add them or have your system administrator install them.

    So after connecting, switch to the root user by typing

    sudo -i

    Then

    1- Installing dependencies

    # aptitude install libperl-dev libc-ares2 libc-ares-dev pkg-config build-essential

    If you'd like to compile znc with SSL support (recommended) you will need to make sure you have the OpenSSL development package installed. The Debian version of this package is named libssl-dev.

    # aptitude install libssl-dev

    Note: install any dependancies that libssl-dev may have.

    Note that if you don’t have root permissions (the default case if you’re renting a seedbox slot) you’ll have to ask your provider to install the following packages:

    -build-essential
    -libssl-dev
    -libperl-dev
    -pkg-config

    However, it is likely they’re already installed.

    Note: I'm not sure what version of linux you got so if aptitude is not available for any reason, here are same thing using apt-get

    To update the package sources and packages installed on the system type:

    apt-get update && apt-get upgrade

    After a moment, it’ll prompt you to answer whether or not you wish to install the listed packages. Type “Yes” and press “Enter”.

    Once the upgrade process is done it will be time to install the aforementioned dependencies. The command used to install these is:

    apt-get install build-essential libssl-dev libperl-dev pkg-config

    It’ll ask you for confirmation to install the packages and their dependencies. Type “Yes” and press enter to install the packages.

    2- Installing ZNC

    As we are no longer required to utilize the root user, type “exit” and this will bring us back into the regular user environment.

    Navigate to your preferred source compiling directory. I usually use /home/USERNAME/src/ but you'll need to make sure you use a directory you have write permissions for.

    We need to grab the latest stable version from the ZNC website via terminal. Check the latest stable sources at

    http://znc.in/releases/
    https://github.com/znc/znc/releases/

    To download the file, type:

    wget http:/ /znc.in/releases/znc-latest.tar.gz

    Now we extract it using:

    tar -xzvf znc*.*gz

    Once this is done we are navigating into the directory:

    cd znc*

    We want to install ZNC in our home directory and not globally since unless you have root access, you will probably not be able to install znc system wide so you will need to specify a location which you have write access to. I suggest something like /home/USERNAME/local/znc/ so we are using the “Home” prefix in this step. Type this while being located in the ZNC directory and press “Enter”.

    ./configure --prefix="/your/chosen/install/directory"

    You may add --with-openssl=/path/to/openssl if you have a non-standard OpenSSL installation.

    If you get an error regarding memory usage then add --disable-optimization to your ./configure command and gcc will need less memory.

    After the configure command being applied, it will take a short moment and once it’s done, we follow the instructions provided by the configure process and type

    $ make

    Note: Compiling can take 5 - 10 minutes or more depending on your hardware. If your server has a multicore processor you can use make -jX where 'X' is the number of cores your machine has. This should allow for faster building.

    Once the build process is over type

    $ make install

    3- Configuration of ZNC

    The last step is all about configuring the now installed ZNC. According to your installing directory type:

    /home/USERNAME/local/znc/bin/znc --makeconf

    - Listen on port (1025 to 65534): 65500 (Port number you will connect to your server on)
    - Listen using SSL (yes/no) [no]: yes (no, if you don't want to use SSL)
    - Listen using both IPv4 and IPv6 (yes/no) [yes]: no (yes, if you know what you are doing)

    -- Admin user settings --

    - Username (alphanumeric): zu (username you will connect to your server with)
    Enter password:
    Confirm password:

    - Nick [zu]: (This username should be your site nick for the IRC network you are connecting to)
    - Alternate nick [zu_]: zu_
    - Ident [zu]: zu (You can have whatever you'd like here, its what appears before the @your.server.ip)
    - Real name [Got ZNC?]: zu (Don't put your real name here)
    - Set up a network? (yes/no) [yes]: n (You may add one new or later through the webadmin in the browser)
    - Listen Host (Blank for all ips): (if you have more than one IP, ZNC can listen on only one or as many as you'd like)
    - Do you want to load any global modules? (yes/no): yes (You can select yes if you'd like to add any global modules, webadmin etc...)

    You'll have to decide which modules you'd like to add for each user. I usually use chansaver, keepnick, disconkick, nickserv, kickrejoin and perform. The full list is here.

    To access the web interface, use your server’s hostname and the port you chose in the first step of the setup assistant. Make sure you’re using https.

    The easiest method of ZNC configuration is via the webadmin module. Make sure you add the webadmin global module during initial setup or SSH into your server and edit the configuration file (usually ~/.znc/configs/znc.conf). Look at the global options at the top of the file. You may or may not see an entry which looks like this: LoadModule = webadmin. If it is there then we'll add some options and if it isn't then add it and add the following options.

    LoadModule = webadmin -noircport SERVER_IP_ADDRESS_OR_HOSTNAME PORT_YOU_WISH_TO_CONNECT_TO

    Save and exit the file then enter the following:

    /etc/init.d/znc restart

    This will restart ZNC and apply the changes you have made. Now point your browser to https://[SERVER_IP_OR_HOSTNAME]:[PORT]/ and you should be greeted with a login prompt. You can login with any of the credentials already setup within ZNC (any of the users) but I suggest logging in as the admin user so you can see all the options available.

    You’ll see the configuration screen as shown below. The “Network Name” is how you want the network to be titled within ZNC - you may use any name you like. However, be sure you do not use spaces or special characters in the name. Select all the IRC settings you want to be used and add the IRC server. Use “+” in front of the port number for SSL.

    http://funkyimg.com/i/2e2aF.jpg

    After this, to quickly connect to your znc connection of the added network simply time in mIRC this

    /server [Ip_Address]:[Port_Number] [User_Name]/[Network_Name]:[Password]

    Of course the use and the password is your znc user and password.

    Using Fedora

    Now I must mention that I tested all this on Fedora not Debian. So here what commands you'll need in Fedora following same instructions. You may simply run (may use dnf instead of yum)

    sudo yum install znc

    Once installed you can configure znc by running:

    sudo -u znc znc --makeconf

    Then finally to start it you can run:

    sudo systemctl start znc

    Or you can install it the same exact way like we did in Debian to get the most recent version. And here are the commands

    sudo -i
    yum install make automake gcc gcc-c++ kernel-devel
    yum install openssl-devel
    yum install pkgconfig
    wget http:/ /znc.in/releases/znc-latest.tar.gz
    tar -xzvf znc*.*gz
    cd znc*
    ./configure --prefix="$HOME/.local"
    /home/user/.local/bin/znc --makeconf

    So it's basically same thing just using yum/dnf and the correct packages names for Fedora.

    Restart ZNC automatically (in case of a machine reboot, crash, etc.)

    - Connect to your seedbox through SSH or open terminal in case you are on the machine.
    - Open your crontab file using the command

    crontab -e

    - Enter the jobs you want to schedule in the editor (one per line) which in our case would be

    */10 * * * * /usr/local/bin/znc >/dev/null 2>&1

    - Hit Ctrl-x to exit. Press Y then Enter to save changes.

    This cron will execute ZNC regularly. If there is already one copy of ZNC running on a particular config file, new copies won't be spawned. This will check if ZNC is running every 10 minutes.

    The correct job syntax for restarting ZNC is @reboot /home/user/znc/bin/znc.

    Congrats. ZNC is installed and ready for connecting and idling !!
    jimmy7, Winnie, Laxus and 1 others like this.

  2. #2
    Donor
    Ronin21's Avatar
    Reputation Points
    139211
    Reputation Power
    100
    Join Date
    Apr 2014
    Posts
    2,450
    Time Online
    207 d 15 h 10 m
    Avg. Time Online
    1 h 21 m
    Mentioned
    916 Post(s)
    Quoted
    560 Post(s)
    Liked
    3610 times
    Feedbacks
    135 (100%)
    Configurations, Connecting and idling !!

    Admin of ZNC

    In case you're admin of the ZNC either by installing it yourself as in the first post or you're the admin on the server you got with ZNC installed on it then you may come to chance to creating users for yourself or others. The admin account has privileges to do and customize ZNC as you wish. Even creating another admin accounts !!

    I'll show how to create another non-admin user for you or others to use to connect and idle on different irc servers. I must mention that I don't like connecting to the servers using the admin account so this is important to me since I probably always make a user for myself to use it on irc connection. Call it paranoia

    Go to any browser and in the address bar type the ZNC address and port (it might be domain name). According to installation in the first post, my address was locally on

    https://192.168.222.25:11222

    Note the https which I selected in the installation process. For ready installed ZNC on server/seedbox, this would be already handed to you. You might face a problem when opening the page the first time since the ssl certification is self registered. It's OK, proceed by making exception or proceeding choice depending on your browser.

    Once you're in, type the admin account details and login

    http://i.imgur.com/8aZEuA6.jpg

    Go for "Manage Users"

    http://i.imgur.com/mQNBFew.jpg

    Create the user name and its password. Here I will do user1

    http://i.imgur.com/aMbL2id.jpg

    Select its settings accordingly to your choice. Some thing like Maximum networks to connect and Join tries.

    http://i.imgur.com/MqM472P.jpg

    Now save these settings. Then go to "Global Settings"

    http://i.imgur.com/LTfFZbe.jpg

    On Binding hosts type the same ip address link or the domain name

    http://i.imgur.com/8HfVSt1.jpg

    Save settings and that's it !!!. You created a user !!

    User of ZNC

    Go to the ZNC url and login using your user details

    http://i.imgur.com/sKF2PrL.jpg

    Go for "Your Settings"

    http://i.imgur.com/DBDxJqp.jpg

    Add a network

    http://i.imgur.com/hYg9Mo4.jpg

    At this point we are about to configure only one network. Means only one server, one nickname and as many channels on same server as you wish to join. So one network = one server.

    Now fill your details. Noting that network name will be used for connection so make it short and descriptive. Like for p2p network just type p2p. If you will connect to p2p network twice with different nicknames then make it p2p1 and p2p2 or anything you like.

    http://i.imgur.com/vT3Satw.jpg

    Note that , servers to this irc network, is meant for backup servers connection. Like if you have 2 domains or 2 servers for same network and want to guarantee connection in case one of them is down. The list would be

    foo.p2p-network.net +6697
    ftw.p2p-network.net +6697

    Also note that I use ssl connection here using the + before the port and the ssl port provided by the server details.

    Nickname, Alt nickname...etc are your choices of course.

    Now look to this screenshot!

    http://i.imgur.com/URhUFDe.jpg

    Here are the modules for some auto-operations. You can use any modules. I recommend the ones marked. All without anything to type except the nickserv module which you must enter the nickserv password to protect your nickname on the server.

    We did NOT register the name yet but type it now since we are already here.

    Save the settings and continue. Go to "Perform" page

    http://i.imgur.com/LjC8y4Y.jpg

    Type all the auto commands you want. In case any disconnection happens, these command will be triggered on connection start. Joining channels, irc key identifications, invites commands...etc.

    http://i.imgur.com/CnhHu02.jpg

    Save and Continue.

    Now open your client and connect. On mIRC you'd use this command

    /server 192.168.222.25:+11222 user1/p2pAnyName:user1password

    - 192.168.222.25:+11222 is the znc server. if it's domain then use the domain name.
    - user1 is the znc username, the one you're using for logging in to the znc web settings (not the irc nickname)
    - p2pAnyName is the network short name we selected
    - user1password is the password for the user1 account

    You can also use null for any client

    /server 192.168.222.25:+11222

    then after connection use

    /quote PASS user1/p2pAnyName:user1

    There are many ways to connect. Now after connection, register your nick and join your channels and do everything as you were NOT using ZNC. To register your nick

    /msg NickServ REGISTER <myNamemyName> <any@anyEmail.com>

    Replace the text between <> (including these marks) with your proper details. Now since everything is ready, we will do one last check and disconnect then reconnect the znc to the network.

    Exit mIRC or whatever client you're suing. Head back you settings.

    http://i.imgur.com/MuZ9Qdw.jpg

    Now go to the network you created and click "Edit" then un-mark "Connect to IRC & automatically re-connect"

    http://i.imgur.com/PhLFFKV.jpg

    Then save the settings and continue. Then go back and mark "Connect to IRC & automatically re-connect" then save the settings.

    Connect now using your client and you will see that the connection initiated, nick identified, channels joined and on the ZNC page it says, 1 Client is connected.

    For more network, repeat and repeat. It's not difficult or something. Just first time you need to pay attention then it will be like pressing the button to power up the PC.
    jimmy7, bad529bye13 and HD37 like this.

  3. #3
    Donor
    bad529bye13's Avatar
    Reputation Points
    37911
    Reputation Power
    100
    Join Date
    Aug 2014
    Posts
    2,655
    Time Online
    39 d 23 h 33 m
    Avg. Time Online
    16 m
    Mentioned
    393 Post(s)
    Quoted
    106 Post(s)
    Liked
    1390 times
    Feedbacks
    114 (100%)
    This is great info.

  4. #4
    User cagriu1905's Avatar
    Reputation Points
    934
    Reputation Power
    36
    Join Date
    Dec 2016
    Posts
    68
    Time Online
    5 d 12 h 10 m
    Avg. Time Online
    2 m
    Mentioned
    15 Post(s)
    Quoted
    6 Post(s)
    Liked
    31 times
    Feedbacks
    7 (100%)
    thank yo for inform

  5. #5
    User Blackholeguy's Avatar
    Reputation Points
    157
    Reputation Power
    29
    Join Date
    Nov 2016
    Posts
    33
    Time Online
    1 d 15 h 50 m
    Avg. Time Online
    N/A
    Mentioned
    8 Post(s)
    Quoted
    1 Post(s)
    Liked
    10 times
    Feedbacks
    2 (100%)
    Thank you for the description.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •