installing_irc_at_home
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
installing_irc_at_home [2020/07/02 17:05] – [Pidgin for GUI clients] waxphilosophic | installing_irc_at_home [2024/09/05 00:05] (current) – ie” hc9 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Installing IRC at Home ====== | ||
+ | |||
+ | Not because you need to, but because you can. | ||
+ | |||
+ | ===== Summary ===== | ||
+ | |||
+ | This how-to covers installing and IRC server and clients for a typical home LAN. The hardware and OS used is a Raspberry Pi 2 with FreeBSD 12.1, but any system with a recent BSD variant should work with little need or no modification. | ||
+ | |||
+ | At the time of writing, the SDF servers run InspIRCd for the server side and ircII for the default client. The same software is used in this document. In addition, this how-to covers Pidgin, a Windows/Mac GUI client that can be used for IRC as well as other instant messaging protocols. Mozilla Thunderbird has IRC capabilities and is covered as well. | ||
+ | |||
+ | ===== Installing Server-Side Software ===== | ||
+ | |||
+ | This section details how to install the InspIRCd server as well as ircII client using pkgtool. | ||
+ | |||
+ | Log in as root to run the following pkg commands: | ||
+ | * pkg update | ||
+ | * pkg install inspircd | ||
+ | * pkg install ircii | ||
+ | |||
+ | ===== Configuring InspIRCd ===== | ||
+ | |||
+ | Configuring the server software is by far the majority of effort required. I am adding some diffs of the config at the end of this document so you can check your work. | ||
+ | |||
+ | You'll need to run everything in this section as the root user. | ||
+ | |||
+ | First, change directory to / | ||
+ | |||
+ | ==== inspircd.conf ==== | ||
+ | |||
+ | Next, use your favorite text editor to open up inspircd.conf. | ||
+ | |||
+ | The file is quite large, but the majority is comments and instructions. The changes to be made will include section names. Section names are in centered and written in all caps inside the file, so they' | ||
+ | |||
+ | === SERVER DESCRIPTION === | ||
+ | |||
+ | Start with the section entitled SERVER DESCRIPTION. Here you will find the server configuration spread out over several lines and interspersed with comments. For the examples in this document, I am naming the server “beastie” after the FreeBSD mascot. My server section (without the comments) looks like this: | ||
+ | |||
+ | < | ||
+ | <server name=" | ||
+ | description=" | ||
+ | network=" | ||
+ | </ | ||
+ | |||
+ | As noted in the configuration file's comments, this DNS name does not need to resolve to an IP address, so don't worry if your only DNS is provided by your ISP. | ||
+ | |||
+ | === ADMIN INFORMATION === | ||
+ | |||
+ | The next section to be edited is ADMIN INFORMATION. This is where the server administrator' | ||
+ | |||
+ | < | ||
+ | <admin | ||
+ | name=" | ||
+ | nick=" | ||
+ | email=" | ||
+ | </ | ||
+ | |||
+ | Again, this is all just a made-up tribute to the FreeBSD mascot. You can enter whatever you like for your set-up. | ||
+ | |||
+ | === PORT CONFIGURATION === | ||
+ | |||
+ | Most of the PORT CONFIGURATION section can be left as it is. However, the last two lines are used to open ports allowing other IRC servers to connect to ours. In a home LAN environment, | ||
+ | |||
+ | So, find these lines: | ||
+ | |||
+ | < | ||
+ | <bind address="" | ||
+ | <bind address=" | ||
+ | </ | ||
+ | |||
+ | Comment them by adding a hash as the first character so they look like this: | ||
+ | |||
+ | < | ||
+ | #<bind address="" | ||
+ | #<bind address=" | ||
+ | </ | ||
+ | |||
+ | === CONNECTIONS CONFIGURATION === | ||
+ | |||
+ | After commenting out the last two lines of PORT CONFIGURATION, | ||
+ | |||
+ | The reason for changing resolvehostnames is entirely because of DNS as you might have guessed. Unless you are running a robust DNS infrastructure on your LAN, chances are good that your ISP's router (the typical home LAN DNS server) will not do reverse look-ups. Setting '' | ||
+ | |||
+ | If you have a more robust DNS server on your network, you can certainly leave this as-is. If you see errors like “'' | ||
+ | |||
+ | There are two '' | ||
+ | |||
+ | < | ||
+ | resolvehostnames=" | ||
+ | </ | ||
+ | |||
+ | Do not give into the temptation to comment the lines out. This is not the same as setting it to no. | ||
+ | |||
+ | As for the IP address range that needs changing, this is in the example < | ||
+ | |||
+ | < | ||
+ | allow=" | ||
+ | </ | ||
+ | |||
+ | === Enabling Server Operators === | ||
+ | |||
+ | Slipped in between the headings of CIDR CONFIGURATION and MISCELLANEOUS CONFIGURATION is a little, unassuming line that looks like this: | ||
+ | |||
+ | < | ||
+ | #< | ||
+ | </ | ||
+ | |||
+ | It needs to be uncommented if you want to enable users to gain administrative privileges. If you don't remove the leading hash, any attempt to use the /OPER command will result in the message “'' | ||
+ | |||
+ | It should look like this when you're done: | ||
+ | |||
+ | < | ||
+ | <include file=" | ||
+ | </ | ||
+ | |||
+ | === Sections left as default === | ||
+ | |||
+ | These are the sections that do not need changes and can be skipped over: | ||
+ | * MISCELLANEOUS CONFIGURATION | ||
+ | * DNS SERVER | ||
+ | * PID FILE | ||
+ | * LIST MODE LIMITS | ||
+ | * SERVER OPTIONS | ||
+ | * PERFORMANCE CONFIGURATION | ||
+ | * SECURITY CONFIGURATION | ||
+ | * LIMITS CONFIGURATION | ||
+ | * PATHS CONFIGURATION | ||
+ | * WHOWAS OPTIONS | ||
+ | * BAN OPTIONS | ||
+ | * INSANE BAN OPTIONS | ||
+ | |||
+ | === MODULES === | ||
+ | |||
+ | The next section to need editing is MODULES. You will have scrolled by quite a few sections to get there. | ||
+ | |||
+ | There is only one change to be made in the MODULES section and that is to uncomment the line that reads: ''#< | ||
+ | |||
+ | It should look like this when you're done: | ||
+ | |||
+ | < | ||
+ | <include file=" | ||
+ | </ | ||
+ | |||
+ | This has the effect of instructing InspIRCd to process all the directives in modules.conf as well as the ones in the main configuration file. The reason for doing this is to enable the permanent channels feature. We'll get to that as soon as we save the changes to the inspircd.conf file. | ||
+ | |||
+ | There is no need to change anything in the SERVICES CONFIGURATION section or anything else in inspircd.conf. | ||
+ | |||
+ | ==== modules.conf ==== | ||
+ | |||
+ | After including modules.conf inside of inspircd.conf, | ||
+ | |||
+ | But, while we're editing, there are two more handy modules to enable. Those are “sha256” and “password_hash” and are used for avoiding plain-text passwords. All of this gives us three uncomments and one new line for modules.conf. | ||
+ | |||
+ | * <module name=" | ||
+ | * <module name=" | ||
+ | * <module name=" | ||
+ | * < | ||
+ | |||
+ | Open modules.conf and search for them one at a time. Remove the hash symbol at the start to uncomment the module. | ||
+ | |||
+ | What started as this: | ||
+ | < | ||
+ | #<module name=" | ||
+ | </ | ||
+ | |||
+ | Should look like this: | ||
+ | < | ||
+ | <module name=" | ||
+ | </ | ||
+ | |||
+ | Make sure to uncomment all three modules. | ||
+ | |||
+ | A little less than 20 lines after uncommenting the permchannels module, you will see a permanent channel definition that's commented out. It looks like this: ''#< | ||
+ | |||
+ | It's just an example line showing how to configure a permanent channel. On the line after that, you can add your own to set up your permanent channel. Mine looks like this: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Notice I removed the modes attribute. It is not required, and defaults suit me fine here. | ||
+ | |||
+ | There is no more configuration needed for the modules.conf file. | ||
+ | |||
+ | ==== opers.conf ==== | ||
+ | |||
+ | Opers, or server operators, are the administrators of the IRC server and can invoke special privileges using the /OPER command. You might be able to run IRC on a home LAN and never need any of the administrative privileges, so if you wish to skip this file, you can. It's simply included for the sake of being complete. | ||
+ | |||
+ | For InspIRCd, the opers.conf is where everything concerning this special ability is configured. | ||
+ | |||
+ | Open up opers.conf in a text editor. | ||
+ | |||
+ | What you see under the headings of CLASS CONFIGURATION and OPERATOR COMPOSITION can be left as default. It's the OPERATOR CONFIGURATION section we're interested in. | ||
+ | |||
+ | There are a couple examples given using the names Attila and Brain. Look them over to read the comments and then delete them. Yes, delete. Delete everything after the section heading. | ||
+ | |||
+ | When you're done, the opers.conf file should end here: | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # # | ||
+ | # Opers are defined here. This is a very important section. | ||
+ | # | ||
+ | # # | ||
+ | </ | ||
+ | |||
+ | We'll insert our operator after this. In keeping with the rest of the how-to, the operator will be named “beastie” and beastie will have full network admin privileges. | ||
+ | |||
+ | Here's what it will look like: | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # # | ||
+ | # Opers are defined here. This is a very important section. | ||
+ | # | ||
+ | # # | ||
+ | <oper | ||
+ | name=" | ||
+ | hash=" | ||
+ | password=" | ||
+ | host=" | ||
+ | type=" | ||
+ | </ | ||
+ | |||
+ | The above should be pretty self-explanatory based on the key=value pairs you see. The two things that require a little clarification are probably password and host. Specifically, | ||
+ | |||
+ | The value for the password is a sha256 hash of the word s3cret. You may remember that was the plain-text password used for Attila in the opers.conf example that we deleted. You can create a new password hash using the sha256 command-line utility included with FreeBSD. | ||
+ | |||
+ | Here's the command to encode the s3cret password and the resulting hash. | ||
+ | |||
+ | < | ||
+ | # sha256 -s s3cret | ||
+ | SHA256 (" | ||
+ | </ | ||
+ | |||
+ | The answer to the question of '' | ||
+ | |||
+ | It would also be difficult to enforce in an environment were there are no reverse DNS lookups and IPs are handed out from a DHCP server. In other words, neither user@hostname nor user@192.168.x.x would work reliably. ''" | ||
+ | |||
+ | Other than changing the lame password, there' | ||
+ | |||
+ | Right around line 75 of opers.conf, you'll see: | ||
+ | |||
+ | < | ||
+ | vhost=" | ||
+ | </ | ||
+ | |||
+ | Following the naming used in the example, change this to: | ||
+ | |||
+ | < | ||
+ | vhost=" | ||
+ | </ | ||
+ | |||
+ | If you have customized the domain names to something else, by all means use that. | ||
+ | |||
+ | ==== motd.txt ==== | ||
+ | |||
+ | Finally, we get to the last InspIRCd file that needs to be edited. This is the motd.txt file that is displayed whenever users log onto the IRC server. | ||
+ | |||
+ | The reason for editing this is to simplify things. The included motd.txt file includes some fabulous ASCII art that causes any server messages to scroll right off the screen. I've changed mine to be a simple one-liner, like this: | ||
+ | |||
+ | < | ||
+ | Welcome to Beastie' | ||
+ | </ | ||
+ | |||
+ | And that's it for configuration of the InspIRCd server. There are diffs at the end of this document if you want something to check against. Otherwise, it's time to start it up. | ||
+ | |||
+ | ===== Starting InspIRCd ===== | ||
+ | |||
+ | The following two commands will enable and start inspircd: | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | To verify it's up and running, use: | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | If all is well, you should see something like this: | ||
+ | |||
+ | < | ||
+ | root@beastie:/ | ||
+ | inspircd is running as pid 7179. | ||
+ | root@beastie:/ | ||
+ | ircd | ||
+ | </ | ||
+ | |||
+ | Port 6667/TCP is the de facto standard port for IRC. Sockstat -l shows that it's a listening port. | ||
+ | |||
+ | ===== Local Client Connection ===== | ||
+ | |||
+ | Seeing InspIRCd running is one thing. Connecting to it is another. We'll use the ircII client that was installed at the beginning of this how-to to verify. | ||
+ | |||
+ | For this part you will need to be a regular, non-root user. | ||
+ | |||
+ | The command is: irc < | ||
+ | |||
+ | It should look something like this when successful: | ||
+ | |||
+ | < | ||
+ | $ irc beastie localhost | ||
+ | *** Connecting to port 6667 of server localhost | ||
+ | *** Welcome to the Home IRC Network beastie!user@127.0.0.1 (from | ||
+ | +beastie.home.lan) | ||
+ | *** Your host is beastie.home.lan, | ||
+ | *** This server was created 07:39:10 Jul 02 2020 | ||
+ | *** umodes available iosw, channel modes available Pbiklmnopstv | ||
+ | *** AWAYLEN=200 CASEMAPPING=ascii CHANLIMIT=#: | ||
+ | +CHANNELLEN=64 CHANTYPES=# ELIST=CMNTU HOSTLEN=64 KEYLEN=32 KICKLEN=255 | ||
+ | +LINELEN=512 MAXLIST=b: | ||
+ | *** MAXTARGETS=20 MODES=20 NETWORK=Home NICKLEN=30 PREFIX=(ov)@+ SAFELIST | ||
+ | +STATUSMSG=@+ TOPICLEN=307 USERLEN=10 WHOX are supported by this server | ||
+ | *** There are 0 users and 0 invisible on 1 servers | ||
+ | *** 1 unknown connections | ||
+ | *** 0 channels have been formed | ||
+ | *** This server has 0 clients and 0 servers connected | ||
+ | *** Current local users: 0 Max: 1 | ||
+ | *** Current global users: 0 Max: 1 | ||
+ | *** beastie.home.lan message of the day | ||
+ | *** Welcome to Beastie' | ||
+ | </ | ||
+ | |||
+ | If you've made it to this point without any errors, congratulations, | ||
+ | |||
+ | The remainder of this how-to will focus on the IRC client. | ||
+ | |||
+ | ===== Customizing ircII ===== | ||
+ | |||
+ | In this section, there are a couple of time saving customizations that can be made. One is to specify a default server and the other is to specify a default channel. Neither are strictly necessary, but are included to save some keystrokes. | ||
+ | |||
+ | By the time you complete this short section, you can simply type irc on the command-line and go to channel #home on your server. | ||
+ | |||
+ | ==== ircII.servers ==== | ||
+ | |||
+ | The first file is created in the / | ||
+ | |||
+ | Here's what it looks like if you've been using the names in this how-to: | ||
+ | |||
+ | < | ||
+ | # cat / | ||
+ | beastie | ||
+ | </ | ||
+ | |||
+ | You need to be root to create or modify the file and the effect is system-wide. Anyone using the ircII client will have the same server. | ||
+ | |||
+ | ==== .ircrc ==== | ||
+ | |||
+ | The next file is .ircrc and it resides in the root of each user's home directory. You should be logged in as a non-root user to create it. | ||
+ | |||
+ | To go straight to the #home channel when logging on, .ircrc should look like this: | ||
+ | |||
+ | < | ||
+ | $ cat .ircrc | ||
+ | channel #home | ||
+ | </ | ||
+ | |||
+ | Of course, if you then decide to connect to the SDF IRC server using your shiny new installation of ircII at home, you will end up creating a channel called #home. Further customization of this file can be done, but is beyond the scope of this how-to. | ||
+ | |||
+ | ===== InspIRCd Diffs ===== | ||
+ | |||
+ | I promised you diffs of the customizations made to the InspIRCd configuration. Here they are: | ||
+ | |||
+ | ==== inspircd.conf ==== | ||
+ | |||
+ | < | ||
+ | 89c89 | ||
+ | < | ||
+ | --- | ||
+ | > | ||
+ | 92c92 | ||
+ | < | ||
+ | --- | ||
+ | > | ||
+ | 102c102 | ||
+ | < | ||
+ | --- | ||
+ | > | ||
+ | 113c113 | ||
+ | < name=" | ||
+ | --- | ||
+ | > name=" | ||
+ | 116c116 | ||
+ | < nick=" | ||
+ | --- | ||
+ | > nick=" | ||
+ | 120c120 | ||
+ | < email=" | ||
+ | --- | ||
+ | > email=" | ||
+ | 225, | ||
+ | < <bind address="" | ||
+ | < <bind address=" | ||
+ | --- | ||
+ | > #<bind address="" | ||
+ | > #<bind address=" | ||
+ | 278c278 | ||
+ | < allow=" | ||
+ | --- | ||
+ | > allow=" | ||
+ | 313c313 | ||
+ | < resolvehostnames=" | ||
+ | --- | ||
+ | > resolvehostnames=" | ||
+ | 449c449 | ||
+ | < resolvehostnames=" | ||
+ | --- | ||
+ | > resolvehostnames=" | ||
+ | 497c497 | ||
+ | < #< | ||
+ | --- | ||
+ | > <include file=" | ||
+ | 1044c1044 | ||
+ | < #< | ||
+ | --- | ||
+ | > <include file=" | ||
+ | </ | ||
+ | |||
+ | ==== modules.conf ==== | ||
+ | |||
+ | < | ||
+ | 49c49 | ||
+ | < #<module name=" | ||
+ | --- | ||
+ | > <module name=" | ||
+ | 1640c1640 | ||
+ | < #<module name=" | ||
+ | --- | ||
+ | > <module name=" | ||
+ | 1683c1683 | ||
+ | < #<module name=" | ||
+ | --- | ||
+ | > <module name=" | ||
+ | 1700a1701 | ||
+ | > < | ||
+ | </ | ||
+ | |||
+ | ==== opers.conf ==== | ||
+ | |||
+ | This is an abreviated diff of opers.conf since most of the changes involved deleting the bottom third of the file. | ||
+ | |||
+ | < | ||
+ | 75c75 | ||
+ | < | ||
+ | --- | ||
+ | > | ||
+ | 94,95d93 | ||
+ | < | ||
+ | < # Operator account with a plaintext password. | ||
+ | 97,99c95,99 | ||
+ | < # name: Oper login that is used to oper up (/OPER < | ||
+ | < # Remember: This is case sensitive. | ||
+ | < | ||
+ | --- | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | > | ||
+ | 101,181d100 | ||
+ | [Not shown for brevity.] | ||
+ | </ | ||
+ | |||
+ | ==== motd.txt ==== | ||
+ | |||
+ | motd.txt is not included since it is simply removing everything and replacing with a single line. | ||
+ | |||
+ | ===== Pidgin for GUI clients ===== | ||
+ | |||
+ | There are many IRC clients available for GUI clients like Windows or MacOS. Pidgin was chosen because it is available on a wide variety of platforms and also supports more than one messaging protocol. It's also very simplistic compared to IRC-specific software and that can be a plus for novice users. | ||
+ | |||
+ | Start by downloading from [[http:// | ||
+ | |||
+ | Next, create an account. | ||
+ | |||
+ | * Choose a protocol of IRC. | ||
+ | * Fill in the login and server that you use on your LAN. | ||
+ | * Password is not required for IRC, and be aware that it is saved in clear text in the %APPDATA% directory if you use it. | ||
+ | * The remaining tabs may be left with default settings. | ||
+ | |||
+ | Once you can successfully connect to the server, you can add the default channel in Pidgin' | ||
+ | |||
+ | * Open the Buddy List. | ||
+ | * Choose the Buddies menu item and select Add Chat from the drop-down. | ||
+ | * Make sure your IRC Account is shown at the top. | ||
+ | * Fill in the channel name. (In the example, the permanent channel name was #home) | ||
+ | * Check the box for Automatically join... | ||
+ | |||
+ | Finally, give the new connection a test and see if you end up in the #home channel on your local server. | ||
+ | |||
+ | See this WikiHow article for a guided step-by-step with pictures: [[ https:// | ||
+ | |||
+ | ===== Thunderbird for GUI clients ===== | ||
+ | |||
+ | In addition to email, Thunderbird also has IRC capabilities. To access, find Chat on the toolbar. It's after Get Messages and Write. Click Chat. | ||
+ | |||
+ | Unless you've set up Thunderbird as a chat client previously, you'll be looking at a message that say you haven' | ||
+ | |||
+ | Follow the set-up wizard. | ||
+ | |||
+ | * Select IRC as the network. | ||
+ | * Enter your nickname and IRC server hostname (beastie.home.lan if you're following the example.) | ||
+ | * You can leave the password blank. | ||
+ | * Change the port to 6667 in the Advanced Options. | ||
+ | * Remove the check for Use SSL in the Advanced Options. | ||
+ | |||
+ | Leave the box checked for connect Connect to This Account Now to test. | ||
+ | |||
+ | ====== Go Forth and Conquer ====== | ||
+ | |||
+ | Now that you're running IRC at home, remember to get everyone else in your household using ircII or Pidgin so you can pester them with messages with just the stroke of a keyboard. | ||