Advertisement
lovejoy_1993

IRC Guide

Jul 16th, 2017
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.02 KB | None | 0 0
  1. For the purpose of this guide I will focus on typing commands as this way is compatible with both Hexchat and irssi. Hexchat is a GUI client, configuration is done by regular point ant click. Irssi is a more traditional unix client where interaction is done only by keyboard, great for people who enjoy scripting.
  2.  
  3.  
  4. Step 1, Registration: You have to type these in order to register.
  5. 1. Join a network: /server -ssl <irc.network_name.net> 6697
  6. 2. Pick a nickname that is free (you'll have your nick changed until you choose one free): /nick <your_nickname>
  7. 3. Request nickname registration (of your current nickname): /msg NickServ REGISTER <your_password> <your@email.com>
  8. 4. Check your e-mail and confirm:
  9. >On Freenode: /msg NickServ VERIFY REGISTER <your_nickname> <confirmation_code_from_email>
  10. >On Rizon: /msg NickServ CONFIRM <confirmation_code_from_email>
  11. 5. Hide your e-mail:
  12. >On Freenode: /msg nickserv set hidemail on
  13. >On Rizon: /msg nickserv set hide email on
  14. 6. Conceal yourself:
  15. >On Freenode
  16. -Check for available staff: /stats p
  17. -Message an available staff: /msg <nickname_of_staff> Hello, may I have an unaffiliated cloak?
  18. -Wait until they give you the cloak.
  19. >On Rizon
  20. -Request a vHost (pick an appropriate vhost): /msg HostServ REQUEST <vhost.goes.here>
  21. -Wait until staff confirms.
  22. -When confirmed type: /msg HostServ ON
  23.  
  24.  
  25. Step 2, Configure your client (choose one):
  26. Option 1, SASL:
  27. >On Hexchat:
  28. -Open the Network List (Ctrl + S)
  29. -Find each network to connect in the list then click on Edit to enter the Edit menu
  30. -On the Edit menu check "Use SSL..." and "Accept invalid SSL"
  31. -On the Edit menu uncheck the use of global user identification
  32. -On the Edit menu enter your nick in the Nick name and User name field
  33. -On the Edit menu select SASL (username + password) in the Login method field
  34. -On the Edit menu enter your password in the password field
  35. >On irssi:
  36. -Edit ~/.irssi/config to change your nick and match the network nick to make auto registration
  37. -Inside irssi type:
  38. /server add -auto -net <network_name> -ssl -ssl_verify <irc.network_name.net> 6697
  39. /network add -sasl_username <your_nickname> -sasl_password <your_password> -sasl_mechanism PLAIN <network_name>
  40. /save
  41. Option 2, CertFP:
  42. Open a command line and type (you will be asked some questions, the importance of filling these correctly may vary):
  43. $ openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout Certificate.key -out Certificate.crt
  44. $ cat Certificate.crt Certificate.key > Certificate.pem
  45. $ rm Certificate.crt Certificate.key
  46. Before jumping to each client, note that for both clients the network and hostname should match (including the lower and uppercase) to what you already use.
  47. >On HexChat:
  48. -Rename the pem file to the network you wish (<Network_name>.pem) and move it to ~/.config/hexchat/certs/
  49. -Open the Network List (Ctrl + S)
  50. -Find each network to connect in the list then click on Edit to enter the Edit menu
  51. -On the Edit menu select the boxes "Use SSL for all the servers on this network" and "Accept invalid SSL certificate"
  52. -On the Edit menu select SASL EXTERNAL (cert) in the Login method field
  53. -Connect to the network: /server -ssl <network_name> 6697
  54. -Login: /msg NickServ IDENTIFY <your_password>
  55. -Register your fingerprint (append FINGERPRINT if on Rizon): /msg NickServ cert add
  56. >On irssi:
  57. -Rename the pem file to the network you wish (<network_name>.pem) and move it to ~/.irssi/certs/
  58. -Edit ~/.irssi/config to change your nick and match the network nick to make auto registration
  59. -Remove the server (make sure to remove all instances): /server remove <irc.network_name.net>
  60. -Add it again with the SSL flag: /server add -ssl -ssl_cert ~/.irssi/certs/<network_name>.pem -network <network_name> <irc.network_name.net> 6697
  61. -Connect to the network (do not /reconnect): /connect <network_name>
  62. -Login: /msg NickServ IDENTIFY <your_password>
  63. -Register your fingerprint (use "/msg NickServ access" if on Rizon): /msg NickServ cert add
  64. -Save changes: /save
  65. Option 3, Use a free bouncer. Choose a network address (<irc.network_name.net>) from http://wiki.znc.in/Providers, and use steps from a previous option you wish.
  66.  
  67.  
  68. Step 3 (OPTIONAL), set ZNC if you have a home server or a VPS. During the configuration wizard you are prompt to some options, if is not mentioned here is safe to leave blank except for the modules so first check the modules you want. If you want a web interface to control ZNC on global modules choose the "webadmin" option:
  69. 0. OPTIONAL. Make sure you have libicu-dev for unicode characters: <package_manager_installation_command> libicu-dev
  70. 1. Create a user for ZNC: adduser znc
  71. 2. Switch to that user: su znc
  72. 3. Change to the user's home directory: cd ~
  73. 4. Install ZNC on your server. You can install like any other application, but an EXTRA OPTIONAL manual installation from source is here described:
  74. -Download: wget -c http://znc.in/releases/znc-latest.tar.gz
  75. -Untar: tar -xzvf znc-latest.tar.gz
  76. -Change to the unziped directory: cd znc-<version>
  77. -Configure installation and path (choose whatever but preferably use "$HOME/.bin"): ./configure --prefix="</path/to/znc/program>"
  78. -Make: make
  79. -Install: make install
  80. 5. Change back to znc home direcoty: cd ~
  81. 6. Remove files you don't need: rm -r znc-*
  82. 7. Change to where znc is installed: cd </path/to/znc/program>
  83. 8. Launch the configuration wizard: ./znc --makeconf
  84. 9. Add a port to run ZNC on (don't run in anything less than 1024): <znc_port_number>
  85. 10. If you know you have openssl choose to connect with SSL to your server (you need this for certauth)
  86. 11. Choose if you want to connect with ipv6 to your server (if you know your server supports it, otherwise choose "no")
  87. 12. Add a user name for login to ZNC: <znc_username>
  88. 13. Add a password for that login: <znc_password>
  89. 14. Choose if you want that login be an administrator of ZNC
  90. 15. Add your IRC username: <your_nickname>
  91. 18. When asks to setup a new server choose "yes".
  92. 19. Add IRC server address: <irc.network_name.net>
  93. 20. Add a port to connect to the network, should be 6697 unless otherwise specified
  94. 21. When done with the configuration exit the znc user just by pressing CTRL-d does the trick or you can type "exit"
  95. 22. While still on the server add a cron job to autostart ZNC (if these don't work you are not using vixie cron)
  96. -Start the cron daemon:
  97. >With System V: sudo update-rc.d cron enable
  98. >With systemd: sudo systemctl enable cron.service
  99. -Add a cron job: sudo crontab -e -u znc
  100. -Add the lines (if you DIDN'T do the manual install the location should be "/usr/local/bin/znc"): @reboot </path/to/znc/program> >/dev/null 2>&1
  101. -If you use ZNC only in your local server add these lines too to set a tight firewall:
  102. sudo iptables -I INPUT -p tcp --dport <znc_port_number> -s 192.168.18.0/24 -j ACCEPT
  103. sudo iptables -A INPUT -p tcp --dport <znc_port_number> -j DROP
  104. 23. Configure authentication of the irc client you use on your computer:
  105. >On Hexchat:
  106. -Open the Network List (Ctrl + S)
  107. -Create a new network in the list then click on Edit to enter the Edit menu
  108. -On the servers list add you ZNC server address followed by the port: <znc_server_ip>/<znc_port_number>
  109. -On the Edit menu check "Use SSL..." and "Accept invalid SSL"
  110. -On the Edit menu uncheck the use of global user identification
  111. -On the Edit menu enter <znc_username>/<network_name> in the User name field
  112. -On the Edit menu select SASL (username + password) in the Login method field
  113. -On the Edit menu enter your <znc_password> in the password field
  114. >On irssi:
  115. -Remove the server (make sure to remove all instances): /server remove <irc.network_name.net>
  116. -Add the ZNC server in its place. NOTE: You can use another name for the network and leave the normal name to connect directly without the bouncer such as znc_network_name:
  117. /network add <znc_network_name>
  118. /server add -net <znc_network_name> -ssl <znc_server_ip> <znc_port_number> <znc_username>/<network_name>:<znc_password>
  119. /save
  120. -Connect to ZNC pointing to the network: /connect <znc_network_name>
  121. -Login as you normally would (do this for each network you want ZNC to stay connected): /msg NickServ IDENTIFY <your_password>
  122. 24. Choose some modules to load (some are required for further options)
  123. -List all available modules: /msg *status ListAvailMods
  124. -Load modules: /msg *status LoadMod <znc_module_name>
  125. >Some modules you may want are:
  126. -"chansaver": ZNC config up to date with channels you parted/joined so that you don't have to add them manually
  127. -"dcc" and "bouncedcc": transfer files to and from ZNC, while using ZNC as a middle man
  128. -"controlpanel":edit ZNC configuration through your IRC client
  129. -"perform": keep a list of commands to be executed
  130. -"sasl": authenticate to an IRC network with SASL, you will also need this for authenticating with a certificate
  131. -"cert": authenticate to an IRC network with a certificate
  132. -"certauth": required (ADVISED) to use a certificate and hide your password from plain files
  133. 25. OPTIONAL. If you want to connect with CertFP (ADVISED as it will hide your password), load the certauth module
  134. -Copy your pem file to the server running ZNC and to /home/znc/.znc/users/<znc_username>/networks/<network_name>/moddata/cert/user.pem
  135. -Add your fingerprint to the ZNC server: /msg *certauth add
  136. -Restart the ZNC server: /msg *status Restart
  137. >On HexChat:
  138. -Rename the pem file to the network you wish (<znc_network_name>.pem) and move it to ~/.config/hexchat/certs/
  139. -Open the Network List (Ctrl + S)
  140. -Create a new network in the list then click on Edit to enter the Edit menu
  141. -On the servers list add you ZNC server address followed by the port: <znc_server_ip>/<znc_port_number>
  142. -On the Edit menu select the boxes "Use SSL for all the servers on this network" and "Accept invalid SSL certificate"
  143. -On the Edit menu uncheck the use of global user identification
  144. -On the Edit menu enter <znc_username>/<network_name> in the User name field
  145. -On the Edit menu select SASL EXTERNAL (cert) in the Login method field
  146. -On the Edit menu enter your <znc_password> in the password field
  147. -Connect to ZNC pointing to the network: /server -ssl <znc_network_name> <znc_port_number>
  148. >On irssi:
  149. -Remove the server (make sure to remove all instances): /server remove <znc_server_ip>
  150. -Add the server pointing to the pem file and without the password: /server add -ssl -ssl_cert ~/.irssi/certs/<znc_network_name>.pem -net <znc_network_name> <znc_server_ip> <znc_port_number> <znc_username>/<network_name>:
  151. /save
  152. -Connect to ZNC pointing to the network: /connect <znc_network_name>
  153. 25. Confirm fingerprint for each network in case of using CertFP (requires "cert" module loaded):
  154. -Login: /msg NickServ IDENTIFY <your_password>
  155. >FREENODE
  156. -To look for you fingerprint on FREENODE: /msg NickServ cert list
  157. -Connect to FREENODE:/msg NickServ cert add <fingerprint>
  158. >RIZON
  159. -To look for you fingerprint on RIZON: /msg NickServ access list
  160. -Connect to RIZON: /msg NickServ access add fingerprint <fingerprint>
  161. NOTES:
  162. -To join the ZNC server (if you set ZNC but not your client): /server -ssl <znc_server_ip> <znc_port_number> <znc_username>:<znc_password>
  163. -To join the ZNC server (if you set ZNC and certauth, but not your client): /server -ssl <znc_server_ip> <znc_port_number> <znc_username>:
  164. -To join the ZNC server (if you set ZNC and your client): /connect <znc_network_name>
  165.  
  166.  
  167.  
  168. Step 4, Learn some commands: Anything that starts with a forward slash is a command. To login you need to either type these each time or configure your client to do it for you. To connect on Hexchat you can go to network list. Whenever you enter IRC you connect to a network but you are not immediately connected to a channel.
  169. To see the help from your IRC client (some_command is optional): /help <some_command>
  170. To see network specific help (while in that network's window -<some_command> is optional-): /msg NickServ help <some_command>
  171. To join a network: /server -ssl <irc.network_name.net> 6697
  172. To join a network (after you set your client): /server <network_name>
  173. To join a network without leaving the current network (on irssi): /connect <network_name>
  174. To quit a network (while in a window from that network): /discon
  175. To login your nickname: /msg NickServ IDENTIFY <your_password>
  176. To join a channel: /join #<some_channel>
  177. To quit a channel (when you are in that channel): /part
  178. To send a message to a single individual: /msg <someone's_nickname> <some_message>
  179. To open a chat window with a single individual: /query <someone's_nickname>
  180. To close a chat window of a single individual (in the window of that individual): /q
  181. To send files to someone: /DCC send <someone's_nickname> </path/to/file>
  182. To accept files from someone: /DCC get <someone's_nickname>
  183. To describe yourself in third person (mostly describing an action): /me <does_something>
  184.  
  185.  
  186. Step 5, LURK! I see people join an IRC channel, say something, and then leave 2 minutes later because they haven't been replied to yet. The speed of IRC conversations can be realtime, but it can also be much slower than that sometimes. You should be willing to leave your IRC program running 24/7 so you can participate in longer-timescale conversations. This is also the best way to guarantee that you get questions answered.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement