Blame
Date:
Wed Feb 1 05:00:29 2023
UTC
Message:
Daily backup
010
2023-01-22
targets=Irc.Guide,IP.Myaddress,Ddos.Intro,Chroot.Intro,Netcat.Irc,Hopm.Install,Ngircd.Ssl,Password.Management,Dns.Vhost,Ngircd.Link,Syslogd.Configure,Openbsd.Rcctl,Anope.Install,Acopm.Install
011
2023-01-22
text=(:title Ngircd Install Guide:)%0a%0aIn this guide, we'll setup [[https://ngircd.barton.de/documentation.php.en|ngircd]], a free, portable, lightweight IRC server.%0a%0a!!Overview%0a%0angircd is an [[Irc/Guide|IRC]] server. It helps IRC clients send messages to one another.%0a%0aAdvantages:%0a%0a# The source code is written in modern, portable C.%0a# The code compiles easily on all BSDs, Linux, and other platforms.%0a# The code is easy to fork to add new features such as spam filters%0a# The server has a very simple, easy-to-understand configuration%0a# Documentation is short and easy to understand%0a# The server is a clean implementation which was written from scratch%0a# The lead developer po||ux actively hangs out on the IRC server barton.ngircd.de on #ngircd%0a%0a!! Docs and references%0a%0aBefore installation, please consult:%0a%0a# The [[https://ngircd.barton.de/documentation.php.en|Official ngIRCd documentation]] %0a# After installation, see also /usr/local/share/doc/ngircd/ for local documentation%0a# Consult the man pages:%0a # @@$ man 5 ngircd.conf@@%0a # @@$ man 8 ngircd@@%0a%0a!! Installation%0a%0a!!! Installing from OpenBSD packages%0a%0a[@%0a$ doas pkg_add ngircd%0a@]%0a%0aCopy the sample configuration file:%0a%0a[@%0a$ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a@]%0a%0angIRCd v26.1 provided by OpenBSD 7.1 ports does not have ident support. On a production server, ident support is essential, so we will need to compile from source (described below). You will want to do this after installing from packages, so that rc.d scripts are created automatically.%0a%0a!!! Building from source%0a%0a'''Note''': Before building from source, make sure you have ngircd package installed using the instructions from above.%0a%0aDownload the IRC server, extract the code, and build it:%0a%0a[@ %0a$ ftp https://ircnow.org/software/ircnowd.tgz%0a$ tar xvzf ircnowd.tgz%0a$ cd ircnowd/%0a$ sh build.sh %0a@]%0a%0a!! Configuring ngircd%0a%0aEdit @@/etc/ngircd/ngircd.conf@@ as root:%0a%0a'''Note''': Lines that begin with # or ; are comments and will be ignored. You will need to remove # or ; to uncomment.%0a%0aTypically, ";" precedes a line of code that has been commented, while a "#" precedes an actual note that should not be uncommented.%0a%0a!!! Global Block%0a%0a[@%0a[Global]%0a Name = irc.example.com%0a AdminInfo1 = Example Network%0a AdminInfo2 = Planet Earth%0a AdminEMail = admin@example.com%0a HelpFile = /usr/local/share/doc/ngircd/Commands.txt%0a Info = irc.example.com%0a@]%0a%0a* Name: Use your server's domain name.%0a* Info: Use your server's domain name.%0a%0a[@%0a Listen = 127.0.0.1,::1,192.168.1.1,2001:db8::%0a@]%0a%0aProvide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1 and ::1), and [[IP/Myaddress|our public IPv4 and IPv6 addresses]]. Keep 127.0.0.1 and ::1 untouched, but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily [[ddos/intro|DDoSed]] and using an unfiltered IP may get you nullrouted.%0a%0a'''Note''': if you do not uncomment this line, you will listen to all IPs by default, which is probably a mistake.%0a%0a[@%0a MotdFile = /etc/ngircd/ngircd.motd%0a ;MotdPhrase = "Hello world!"%0a Network = ExampleNet%0a ;Password = abc%0a@]%0a%0a* Network: Your network name; this usually contains no periods.%0a%0aKeep the MotdPhrase and Password commented out. First, we will be using a MotdFile instead. Secondly, we do not want a global password for a public server.%0a%0a[@%0a PidFile = /var/run/ngircd/ngircd.pid%0a@]%0a%0aThe Pid file is where ngircd writes its process ID.%0a%0a[@%0a Ports = 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669, 7000, 16667%0a ServerGID = _ngircd%0a ServerUID = _ngircd%0a@]%0a%0aIt's recommended to provide ports besides the standard 6667 to allow users to bypass network firewalls. %0a%0a'''NOTE''': Make sure to set the ServerUID and ServerGID to _ngircd. Otherwise, it runs as the user nobody by default.%0a%0a!!! Limits Block%0a%0a[@%0a[Limits]%0a MaxConnectionsIP = 0%0a MaxJoins = 300%0a MaxNickLength = 16%0a MaxListSize = 3000%0a PingTimeout = 300%0a PongTimeout = 300%0a@]%0a%0aWe allow unlimited connections per IP and handle abuse with other techniques.%0a%0aMaxNickLength: '''must''' be identical for all servers on the network. On IRCNow, MaxNickLength is [@16@].%0a%0a!!! Options Block%0a%0a[@%0a[Options]%0a AllowRemoteOper = yes%0a ChrootDir = /var/ngircd%0a ;CloakHost = %25x%0a CloakHostModeX = %25x%0a CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a DefaultUserModes = ix%0a DNS = yes%0a Ident = yes%0a@]%0a%0aWe will turn on AllowRemoteOpers so that GLINEs function properly.%0a%0aWe want to [[Chroot.Intro|chroot]] to /var/ngircd to prevent a security compromise. %0a%0aWe will cloak the host using a unique salt; contact another sysadmin for the exact salt. If not linking to another network, you can leave it commented to use a random salt each time it runs, or you can generate your own random salt.%0a%0aWe use CloakHostModeX so that users are cloaked when mode +x is set. Users can then turn off mode x in order to remove the cloak (to show a custom hostmask). If we had used CloakHost instead, uncloaking a user would not be possible.%0a%0aUser mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment.%0a%0aWe want to perform DNS lookups when a client connects so that we can validate a user's hostmask. We also want to perform IDENT lookups.%0a%0a[@%0a NoticeBeforeRegistration = yes%0a OperCanUseMode = yes%0a OperChanPAutoOp = no %0a PAM = no%0a RequireAuthPing = yes%0a SyslogFacility = daemon%0a@]%0a%0aReceiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. It is also necessary for [[hopm/install|hopm]].%0a%0aOperCanUseMode will allow opers the ability to use mode commands when needed. '''Opers should use this power sparingly''', generally only if the channel owner is unable to moderate his channel.%0a%0aOperChanPAutoOp should be set to no so that opers are not automatically op'd in every channel they join. Opers should not interfere with normal channel operation.%0a%0aSet PAM to no because enabling PAM on OpenBSD causes issues.%0a%0aWe set RequireAuthPing to yes because it may help reduce spam.%0a%0aWe're going to log using syslog (see below) to log events.%0a%0a!!! SSL block%0a%0a[@ %0a;[SSL]%0a@]%0a%0a'''This entire block should be commented'''. When you are ready to set up [[ngircd/ssl|SSL/TLS encryption]], un-comment the entire block.%0a%0a'''WARNING''': Do not send passwords or sensitive data over this server until SSL is set up.%0a%0a!!! Operator Block%0a%0aCreate one Operator block for each operator on the server:%0a%0a[@%0a[Operator]%0a Name = username%0a Password = password%0a ;Mask = *!ident@somewhere.example.com%0a@]%0a%0aPlease use a [[password/management|long, random string]] for your password.%0a%0aIf you uncomment Mask, your hostmask must match the operator hostmask in order for the /OPER command to work. If the hostmask differs by even a single character, then your /OPER command will be rejected. It's best to leave Mask commented out until you are familiar with ngircd.%0a%0aOnce your configuration is tested and stable, you can uncomment Mask and have it match your [[dns/vhost|vhost]]. However, please be aware that this will make it impossible to become IRC Operator if you connect from a different IP address.%0a%0a!!! Server Block%0a%0a[@%0a;[Server]%0a@]%0a%0aThe server block is used to connect to other servers to form a network. You can have multiple server blocks. For now, leave it commented out until you are ready to [[ngircd/link|link ngircd]].%0a%0aYou are now finished editing ngircd.conf, so we turn to edit other files.%0a%0a!! MOTD file%0a%0aCreate the Message of the Day in /etc/ngircd/ngircd.motd. Here is a suggested template:%0a%0a[@%0aIRCNow - The Users' Network%0a%0aIRCNow is the network of the user, by the user, for the user.%0a%0a * No porn / illegal drugs / threats of violence%0a * No slander / libel / gambling%0a * No spam, illegal cracking, or DDoS%0a * No copyright infrigement%0a%0aYou must agree to our terms of service and our privacy policy %0ato use this network:%0a%0ahttps://wiki.ircnow.org/index.php?n=Terms.Terms%0a%0aOnly 5 connections per IP address. If you need help, please speak with staff on #help.%0a@]%0a%0a!! Configuring [[syslogd/configure|syslog]]%0a%0aAll log messages from ngircd should go to [@ /var/log/ngircd.log @]. Insert these three lines starting at line 3 (at the top) in [@/etc/syslog.conf@]:%0a%0a[@%0a!!ngircd%0a*.* /var/log/ngircd.log%0a!*%0a@]%0a%0aThis directs all logs from ngircd to go straight to /var/log/ngircd.log.%0a%0aSyslogd expects all logfiles to already exist with the correct permissions. So, we will create the file /var/log/ngircd.log and restart syslogd:%0a%0a[@%0a$ doas touch /var/log/ngircd.log%0a$ doas rcctl restart syslogd%0a@]%0a%0a!! Chroot%0a%0aWe need to set up the [[chroot/intro|chroot]] for ngircd. Let's copy the files into the chroot:%0a%0a[@%0a$ doas mkdir /var/ngircd/etc/%0a$ doas cp /etc/resolv.conf /var/ngircd/etc/%0a$ doas cp -R /etc/ngircd /var/ngircd/etc/%0a$ doas chown -R _ngircd:_ngircd /var/ngircd/%0a$ doas rm -r /etc/ngircd%0a$ doas ln -s /var/ngircd/etc/ngircd /etc/ngircd%0a$ doas mkdir -p /var/ngircd/usr/local/share/doc/%0a$ doas cp -R /usr/local/share/doc/ngircd/ /var/ngircd/usr/local/share/doc/%0a$ doas chown -R _ngircd:_ngircd /var/ngircd/usr/local/share/doc/ngircd/%0a@]%0a%0aThis will create a symlink so that only one set of configuration files needs to be maintained inside and outside of the chroot. Otherwise, ngircd will require two sets of configuration files, one inside and the other outside of the chroot.%0a%0a!! Automation%0a%0aTo automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/ngircd/restart.sh:%0a%0a[@%0a$ doas mkdir -p /usr/local/libexec/ngircd/%0a$ doas touch /usr/local/libexec/ngircd/restart.sh%0a$ doas chmod +x /usr/local/libexec/ngircd/restart.sh%0a@]%0a%0aEdit @@/usr/local/libexec/ngircd/restart.sh@@:%0a%0a[@%0a#!/bin/sh%0a%0aSERVICE_NAME="ngircd"%0aSERVICE_USER="_ngircd"%0aSERVICE_PID="/var/ngircd/var/run/ngircd/ngircd.pid"%0a%0aif ! pgrep -u $SERVICE_USER -x "$SERVICE_NAME" > /dev/null%0athen%0a if [ -f $SERVICE_PID ]; then%0a rm -f $SERVICE_PID%0a rcctl -d restart $SERVICE_NAME%0a fi%0afi%0a@]%0a%0aAdd this as a cronjob:%0a%0a[@%0a$ doas crontab -e%0a%0a*/5 * * * * /usr/local/libexec/ngircd/restart.sh > /dev/null 2>&1%0a@]%0a%0aFor the solution to work, make sure you have enabled the use of pid files in /etc/ngircd/ngircd.conf:%0a%0a[@%0aPidFile = /var/run/ngircd/ngircd.pid%0a@]%0a%0a!! Starting ngircd%0a%0aTo start ngircd via [[openbsd/rcctl|rcctl]]:%0a%0a[@%0adoas rcctl enable ngircd%0adoas rcctl start ngircd%0a@]%0a%0aNext, use your IRC client to connect to the server. Join a few channels and chat inside. You will need to invite your friends, since a new IRC server will have no other users on it.%0a%0a!! Troubleshooting%0a%0aIf you run into any errors, you can test to see if your configuration file has errors:%0a%0a[@%0a$ doas ngircd -t%0a@]%0a%0aTo run ngircd in debug mode:%0a%0a[@%0a$ doas ngircd -n%0a@]%0a%0aCheck [@ /var/log/ngircd.log @] to see if ngircd is listening on the correct IP addresses and ports. Connect to those ports using your IRC client to verify that the server is working as intended.%0a%0aRemember, if you are connecting using port 6667 without SSL, any eavesdropper can read all your text, including your passwords. '''Don't send any sensitive information until you have upgraded to [[ngircd/ssl|SSL]].'''%0a%0a!! Reloading and Restarting ngIRCd%0a%0aAfter you edit [@ /etc/ngircd/ngircd.conf @] for a running ngircd server, you will need to reload the configuration file:%0a%0a[@%0a$ doas rcctl reload ngircd%0a@]%0a%0aAlternatively, you can run:%0a%0a[@%0a$ doas pkill -HUP ngircd%0a@]%0a%0a'''Reloading''' a configuration file will '''not''' disconnect any active connections. So, try to reload the configuration where possible '''instead of restarting the service'''.%0a%0aTo restart the ircd:%0a%0a[@%0a$ doas rcctl restart ngircd%0a@]%0a%0a'''WARNING''': '''Restarting''' the ircd '''will''' disconnect all existing connections. So, try to restart ngircd only when absolutely necessary.%0a%0a'''WARNING''': ngircd appears to have a bug where the ircd will crash if you reload the configuration file while a message is being sent. Be careful to avoid reloading configuration files when many users are chatting.%0a%0a!! See Also%0a%0a# Configure [[ngircd/ssl|SSL]] for ngircd to ensure secure connections%0a# [[ngircd/link|Link your ngircd]] with another server to create a network%0a# Install [[anope/install|anope]] to provide services%0a# Configure [[hopm/install|hopm]], an open proxy monitor to stop spammers.%0a# Configure [[acopm/install|acopm]], a minimalist open proxy monitor to stop spammers.%0a
019
2023-01-22
diff:1659546979:1659053857:=26,28c26,28%0a%3c # @@$ man 5 ngircd.conf@@%0a%3c # @@$ man 8 ngircd@@%0a%3c %0a---%0a> # $ man 5 ngircd.conf%0a> # $ man 8 ngircd%0a> %0a33,36c33,34%0a%3c [@%0a%3c $ doas pkg_add ngircd%0a%3c @]%0a%3c %0a---%0a> [@$ doas pkg_add ngircd @]%0a> %0a39,40c37%0a%3c [@%0a%3c $ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a---%0a> [@$ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a43,44c40,41%0a%3c ngIRCd v26.1 provided by OpenBSD 7.1 ports does not have ident support. On a production server, ident support is essential, so we will need to compile from source (described below). You will want to do this after installing from packages, so that rc.d scripts are created automatically.%0a%3c %0a---%0a> ngIRCd v26.1 provided by OpenBSD 7.0 ports does not have ident support. On a production server, ident support is essential, so we will need to compile from source (described below). You will want to do this after installing from packages, so that rc.d scripts are created automatically.%0a> %0a60c57%0a%3c Edit @@/etc/ngircd/ngircd.conf@@ as root:%0a---%0a> Edit [@ /etc/ngircd/ngircd.conf @] as root:%0a
022
2023-01-22
diff:1659053857:1656939139:minor=57,58c57,58%0a%3c Edit [@ /etc/ngircd/ngircd.conf @] as root:%0a%3c %0a---%0a> Edit [@ /etc/ngircd/ngircd.conf @]:%0a> %0a323c323%0a%3c Next, use your IRC client to connect to the server. Join a few channels and chat inside. You will need to invite your friends, since a new IRC server will have no other users on it.%0a---%0a> Next, use your IRC client to connect to the server. Join a few channels and chat inside.%0a
025
2023-01-22
diff:1656939139:1649316468:=295c295%0a%3c rcctl -d restart $SERVICE_NAME%0a---%0a> rcctl -d start $SERVICE_NAME%0a
028
2023-01-22
diff:1649316468:1649315205:=312a313,314%0a> %0a> Make sure to configure [[hopm/install|hopm]].%0a
031
2023-01-22
diff:1649315205:1649314785:=375a376%0a> # Install [[achurch/install|achurch]] to test achurch services%0a
034
2023-01-22
diff:1649314785:1648181477:=271,314d270%0a%3c %0a%3c !! Automation%0a%3c %0a%3c To automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/ngircd/restart.sh:%0a%3c %0a%3c [@%0a%3c $ doas mkdir -p /usr/local/libexec/ngircd/%0a%3c $ doas touch /usr/local/libexec/ngircd/restart.sh%0a%3c $ doas chmod +x /usr/local/libexec/ngircd/restart.sh%0a%3c @]%0a%3c %0a%3c Edit @@/usr/local/libexec/ngircd/restart.sh@@:%0a%3c %0a%3c [@%0a%3c #!/bin/sh%0a%3c %0a%3c SERVICE_NAME="ngircd"%0a%3c SERVICE_USER="_ngircd"%0a%3c SERVICE_PID="/var/ngircd/var/run/ngircd/ngircd.pid"%0a%3c %0a%3c if ! pgrep -u $SERVICE_USER -x "$SERVICE_NAME" > /dev/null%0a%3c then%0a%3c if [ -f $SERVICE_PID ]; then%0a%3c rm -f $SERVICE_PID%0a%3c rcctl -d start $SERVICE_NAME%0a%3c fi%0a%3c fi%0a%3c @]%0a%3c %0a%3c Add this as a cronjob:%0a%3c %0a%3c [@%0a%3c $ doas crontab -e%0a%3c %0a%3c */5 * * * * /usr/local/libexec/ngircd/restart.sh > /dev/null 2>&1%0a%3c @]%0a%3c %0a%3c For the solution to work, make sure you have enabled the use of pid files in /etc/ngircd/ngircd.conf:%0a%3c %0a%3c [@%0a%3c PidFile = /var/run/ngircd/ngircd.pid%0a%3c @]%0a%3c %0a%3c Make sure to configure [[hopm/install|hopm]].%0a
037
2023-01-22
diff:1648181477:1648181362:=247c247%0a%3c Syslogd expects all logfiles to already exist with the correct permissions. So, we will create the file /var/log/ngircd.log and restart syslogd:%0a---%0a> Next, create the file /var/log/ngircd.log and restart syslogd:%0a
040
2023-01-22
diff:1648181362:1648180006:=235c235%0a%3c !! Configuring [[syslogd/configure|syslog]]%0a---%0a> !! Configuring syslog%0a
043
2023-01-22
diff:1648180006:1648141852:=7c7%0a%3c ngircd is an [[Irc/Guide|IRC]] server. It helps IRC clients send messages to one another.%0a---%0a> ngircd is an [[IRC/Guide|IRC]] server. It helps IRC clients send messages to one another.%0a
049
2023-01-22
diff:1648141818:1648141334:=204d203%0a%3c %0a206c205%0a%3c ;[Server]%0a---%0a> [Server]%0a209,213c208,213%0a%3c The server block is used to connect to other servers to form a network. You can have multiple server blocks. For now, leave it commented out until you are ready to [[ngircd/link|link ngircd]].%0a%3c %0a%3c You are now finished editing ngircd.conf, so we turn to edit other files.%0a%3c %0a%3c !! MOTD file%0a---%0a> The server block is used to connect to other servers to form a network. You can have multiple server blocks. See: [[ngircd/link|Link your ngircd]] %0a> %0a> %0a> You are finished editing ngircd.conf%0a> %0a> !!MOTD file%0a
052
2023-01-22
diff:1648141334:1648141026:=188,189c188,189%0a%3c Create one Operator block for each operator on the server:%0a%3c %0a---%0a> You may have as many Operator Blocks as you like, one for each Operator.%0a> %0a194d193%0a%3c ;Mask = *!ident@somewhere.example.com%0a199,201c198,200%0a%3c If you uncomment Mask, your hostmask must match the operator hostmask in order for the /OPER command to work. If the hostmask differs by even a single character, then your /OPER command will be rejected. It's best to leave Mask commented out until you are familiar with ngircd.%0a%3c %0a%3c Once your configuration is tested and stable, you can uncomment Mask and have it match your [[dns/vhost|vhost]]. However, please be aware that this will make it impossible to become IRC Operator if you connect from a different IP address.%0a---%0a> If you uncomment Mask, your hostmask must match the operator hostmask in order for the /OPER command to be accepted. If it differs at all, then your /OPER command will be rejected. If you don't want to check the hostmask, leave Mask commented out.%0a> %0a> For more security, you can uncomment Mask and have it match your vhost. However, please be aware that this will make it impossible to authenticate if you ever have to connect from a different IP address.%0a
055
2023-01-22
diff:1648141026:1648140259:=151,152d150%0a%3c User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment.%0a%3c %0a159d156%0a%3c PAM = no%0a164,175c161,165%0a%3c Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. It is also necessary for [[hopm/install|hopm]].%0a%3c %0a%3c OperCanUseMode will allow opers the ability to use mode commands when needed. '''Opers should use this power sparingly''', generally only if the channel owner is unable to moderate his channel.%0a%3c %0a%3c OperChanPAutoOp should be set to no so that opers are not automatically op'd in every channel they join. Opers should not interfere with normal channel operation.%0a%3c %0a%3c Set PAM to no because enabling PAM on OpenBSD causes issues.%0a%3c %0a%3c We set RequireAuthPing to yes because it may help reduce spam.%0a%3c %0a%3c We're going to log using syslog (see below) to log events.%0a%3c %0a---%0a> %0a> User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment.%0a> %0a> Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. It is necessary for [[hopm/install|hopm]]. We're going to log using syslog (see below).%0a> %0a182c172%0a%3c '''This entire block should be commented'''. When you are ready to set up [[ngircd/ssl|SSL/TLS encryption]], un-comment the entire block.%0a---%0a> This entire block should be commented. When you are ready to set up [[ngircd/ssl|SSL/TLS encryption]], un-comment the entire block.%0a
058
2023-01-22
diff:1648140259:1648139583:=135,136c135,136%0a%3c ;CloakHost = %25x%0a%3c CloakHostModeX = %25x%0a---%0a> CloakHost = %25x%0a> ;CloakHostModeX = cloaked.user%0a138,140c138,143%0a%3c DefaultUserModes = ix%0a%3c DNS = yes%0a%3c Ident = yes%0a---%0a> DefaultUserModes = i%0a> ;DNS = no%0a> NoticeBeforeRegistration = yes%0a> OperChanPAutoOp = no %0a> RequireAuthPing = yes%0a> SyslogFacility = daemon%0a147,160c150%0a%3c We will cloak the host using a unique salt; contact another sysadmin for the exact salt. If not linking to another network, you can leave it commented to use a random salt each time it runs, or you can generate your own random salt.%0a%3c %0a%3c We use CloakHostModeX so that users are cloaked when mode +x is set. Users can then turn off mode x in order to remove the cloak (to show a custom hostmask). If we had used CloakHost instead, uncloaking a user would not be possible.%0a%3c %0a%3c We want to perform DNS lookups when a client connects so that we can validate a user's hostmask. We also want to perform IDENT lookups.%0a%3c %0a%3c [@%0a%3c NoticeBeforeRegistration = yes%0a%3c OperCanUseMode = yes%0a%3c OperChanPAutoOp = no %0a%3c RequireAuthPing = yes%0a%3c SyslogFacility = daemon%0a%3c @]%0a%3c %0a---%0a> We will cloak the host using a unique salt; contact another sysadmin for the exact salt. If not linking to a network, you can leave it commented for a random salt each time it runs or you can provide your own random salt.%0a
061
2023-01-22
diff:1648139583:1648138974:=88d87%0a%3c ;MotdPhrase = "Hello world!"%0a90d88%0a%3c ;Password = abc%0a93,96c91,93%0a%3c * Network: Your network name; this usually contains no periods.%0a%3c %0a%3c Keep the MotdPhrase and Password commented out. First, we will be using a MotdFile instead. Secondly, we do not want a global password for a public server.%0a%3c %0a---%0a> * Motdfile stands for "Message of the Day"; we will create this file later on.%0a> * Network: Your network name.%0a> %0a98c95,97%0a%3c PidFile = /var/run/ngircd/ngircd.pid%0a---%0a> Ports = 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669, 7000, 16667%0a> ServerGID = _ngircd%0a> ServerUID = _ngircd%0a101,108d99%0a%3c The Pid file is where ngircd writes its process ID.%0a%3c %0a%3c [@%0a%3c Ports = 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669, 7000, 16667%0a%3c ServerGID = _ngircd%0a%3c ServerUID = _ngircd%0a%3c @]%0a%3c %0a125,127c116%0a%3c We allow unlimited connections per IP and handle abuse with other techniques.%0a%3c %0a%3c MaxNickLength: '''must''' be identical for all servers on the network. On IRCNow, MaxNickLength is [@16@].%0a---%0a> MaxNickLength: '''must''' be identical to all servers on the network. On IRCNow, MaxNickLength is [@16@].%0a
064
2023-01-22
diff:1648138974:1648138103:=42,43c42,44%0a%3c !!! Building from source%0a%3c %0a---%0a> !!! Installing from source%0a> %0a> %0a59,60c60,61%0a%3c '''Note''': Lines that begin with # or ; are comments and will be ignored. You will need to remove # or ; to uncomment.%0a%3c %0a---%0a> '''Note''': Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment%0a> %0a71d71%0a%3c HelpFile = /usr/local/share/doc/ngircd/Commands.txt%0a82c82%0a%3c Provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1 and ::1), and [[IP/Myaddress|our public IPv4 and IPv6 addresses]]. Keep 127.0.0.1 and ::1 untouched, but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily [[ddos/intro|DDoSed]] and using an unfiltered IP may get you nullrouted.%0a---%0a> Uncomment this line and provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1 and ::1), and [[IP/Myaddress|our public IPv4 and IPv6 addresses]]. Keep 127.0.0.1 and ::1 untouched, but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a
067
2023-01-22
diff:1648138103:1648137933:=25,29c25,27%0a%3c # Consult the man pages:%0a%3c # $ man 5 ngircd.conf%0a%3c # $ man 8 ngircd%0a%3c %0a%3c !! Installation%0a---%0a> # Consult the man pages%0a> %0a> !!Installation%0a
070
2023-01-22
diff:1648137933:1648137542:=19,26c19,22%0a%3c !! Docs and references%0a%3c %0a%3c Before installation, please consult:%0a%3c %0a%3c # The [[https://ngircd.barton.de/documentation.php.en|Official ngIRCd documentation]] %0a%3c # After installation, see also /usr/local/share/doc/ngircd/ for local documentation%0a%3c # Consult the man pages%0a%3c %0a---%0a> !!Docs and references%0a> %0a> # [[https://ngircd.barton.de/documentation.php.en|Official ngIRCd documentation]] %0a> %0a58c54%0a%3c '''Note''': Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment%0a---%0a> '''Note''': Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line if that is desired.%0a
073
2023-01-22
diff:1648137542:1644786667:=41c41%0a%3c Download the IRC server, extract the code, and build it:%0a---%0a> Pull the codebase from IRCNow's file servers, extract the code, and install it%0a
076
2023-01-22
diff:1644786667:1644786645:=85,86c85,86%0a%3c * Motdfile stands for "Message of the Day"; we will create this file later on.%0a%3c * Network: Your network name.%0a---%0a> Motdfile stands for "Message of the Day"; we will create this file later on.%0a> Network: Your network name.%0a
079
2023-01-22
diff:1644786645:1644786622:=78c78%0a%3c '''Note''': if you do not uncomment this line, you will listen to all IPs by default, which is probably a mistake.%0a---%0a> '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a
082
2023-01-22
diff:1644786622:1644786528:=76c76%0a%3c Uncomment this line and provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1 and ::1), and [[IP/Myaddress|our public IPv4 and IPv6 addresses]]. Keep 127.0.0.1 and ::1 untouched, but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a---%0a> Uncomment this line and provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1 and ::1), and our public IPv4 and IPv6 addresses. Keep 127.0.0.1 and ::1 untouched, but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a
085
2023-01-22
diff:1644786528:1644785351:=69,70c69,70%0a%3c * Name: Use your server's domain name.%0a%3c * Info: Use your server's domain name.%0a---%0a> *Name: Use your server's domain name.%0a> *Info: Use your server's domain name.%0a
088
2023-01-22
diff:1644785351:1642657833:=34c34%0a%3c ngIRCd v26.1 provided by OpenBSD 7.0 ports does not have ident support. On a production server, ident support is essential, so we will need to compile from source (described below). You will want to do this after installing from packages, so that rc.d scripts are created automatically.%0a---%0a> ngIRCd v26.1 provided by OpenBSD 6.9 ports does not have ident support. On a production server, ident support is essential, so we will need to compile from source (described below). You will want to do this after installing from packages, so that rc.d scripts are created automatically.%0a
091
2023-01-22
diff:1642657833:1639821547:=105c105%0a%3c MaxListSize = 3000%0a---%0a> MaxListSize = 1000%0a
097
2023-01-22
diff:1639821534:1639817882:=119,126c119,124%0a%3c ;CloakHostModeX = cloaked.user%0a%3c CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a%3c DefaultUserModes = i%0a%3c ;DNS = yes%0a%3c NoticeBeforeRegistration = yes%0a%3c OperChanPAutoOp = no %0a%3c RequireAuthPing = yes%0a%3c SyslogFacility = daemon%0a---%0a> CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a> DefaultUserModes = i%0a> NoticeBeforeRegistration = yes%0a> OperChanPAutoOp = no %0a> RequireAuthPing = yes%0a> SyslogFacility = daemon%0a
100
2023-01-22
diff:1639817882:1639817723:=44,46c44,46%0a%3c $ ftp https://ircnow.org/software/ircnowd.tgz%0a%3c $ tar xvzf ircnowd.tgz%0a%3c $ cd ircnowd/%0a---%0a> $ ftp https://ircnow.org/software/ngircd.tgz%0a> $ tar xvzf ngircd.tgz%0a> $ cd ngircd-26.1/%0a
103
2023-01-22
diff:1639817723:1638884657:=118a119%0a> CloakHostModeX = %25x%0a120c121%0a%3c DefaultUserModes = i%0a---%0a> DefaultUserModes = ix%0a133c134%0a%3c User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment.%0a---%0a> User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment. User mode +x cloaks the user by default.%0a
112
2023-01-22
diff:1638840723:1637366855:=73c73%0a%3c Listen = 127.0.0.1,::1,192.168.1.1,2001:db8::%0a---%0a> Listen = 127.0.0.1,192.168.1.1,2001:db8::%0a76c76%0a%3c Uncomment this line and provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1 and ::1), and our public IPv4 and IPv6 addresses. Keep 127.0.0.1 and ::1 untouched, but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a---%0a> Uncomment this line and provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Keep 127.0.0.1 but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a
115
2023-01-22
diff:1637366855:1636462605:=37,39d36%0a%3c %0a%3c %0a%3c '''Note''': Before building from source, make sure you have ngircd package installed using the instructions from above.%0a
118
2023-01-22
diff:1636462605:1635167345:=116d115%0a%3c CloakHostModeX = %25x%0a118c117%0a%3c DefaultUserModes = ix%0a---%0a> DefaultUserModes = i%0a131c130%0a%3c User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment. User mode +x cloaks the user by default.%0a---%0a> User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment. %0a
121
2023-01-22
diff:1635167345:1633228664:=113c113%0a%3c AllowRemoteOper = yes%0a---%0a> AllowRemoteOper = no%0a124,125c124,125%0a%3c We will turn on AllowRemoteOpers so that GLINEs function properly.%0a%3c %0a---%0a> For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you might not trust an oper on another server.%0a> %0a
124
2023-01-22
diff:1633228664:1631975364:=116c116%0a%3c CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a---%0a> CloakHostSalt = %3cabcdefghijklmnopqrstuvwxyz>%0a
127
2023-01-22
diff:1631975364:1631964903:=222,224d221%0a%3c $ doas mkdir -p /var/ngircd/usr/local/share/doc/%0a%3c $ doas cp -R /usr/local/share/doc/ngircd/ /var/ngircd/usr/local/share/doc/%0a%3c $ doas chown -R _ngircd:_ngircd /var/ngircd/usr/local/share/doc/ngircd/%0a
130
2023-01-22
diff:1631964903:1631956282:=73,76c73,74%0a%3c Uncomment this line and provide every single IP address you want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Keep 127.0.0.1 but replace 192.168.1.1 and 2001:db8:: with your real public IPs. If you are hosting a public service, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a%3c %0a%3c '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a%3c %0a---%0a> Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted. '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a> %0a79c77%0a%3c Network = ExampleNet%0a---%0a> Network = IRCNow%0a82,84c80,83%0a%3c Motdfile stands for "Message of the Day"; we will create this file later on.%0a%3c Network: Your network name.%0a%3c %0a---%0a> Motdfile: Stands for "Message of the Day", we will create this at that file location later on.%0a> %0a> Network: IRCNow, or your network (Liberachat, freenode, etc...)%0a> %0a91,94c90,95%0a%3c It's recommended to provide ports besides the standard 6667 to allow users to bypass network firewalls. %0a%3c %0a%3c '''NOTE''': Make sure to set the ServerUID and ServerGID to _ngircd. Otherwise, it runs as the user nobody by default.%0a%3c %0a---%0a> Ports: listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls (censorship). %0a> %0a> ServerGID: Uncomment, name (or number) of the Group to run as%0a> %0a> ServerUID: Uncomment, name (or number) of the User to run as%0a> %0a117c118%0a%3c DefaultUserModes = i%0a---%0a> DefaultUserModes = iC%0a124c125%0a%3c For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you might not trust an oper on another server.%0a---%0a> AllowRemoteOper: For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server.%0a126,133c127,134%0a%3c We want to [[Chroot.Intro|chroot]] to /var/ngircd to prevent a security compromise. %0a%3c %0a%3c We will cloak the host using a unique salt; contact another sysadmin for the exact salt. If not linking to a network, you can leave it commented for a random salt each time it runs or you can provide your own random salt.%0a%3c %0a%3c User mode +i keeps the user invisible so that /whois does not show all channels a user has joined. This helps reduce stalking and harassment. %0a%3c %0a%3c Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. It is necessary for [[hopm/install|hopm]]. We're going to log using syslog (see below).%0a%3c %0a---%0a> ChrootDir: We want to [[Chroot.Intro|chroot]] to /var/ngircd to prevent a security compromise. %0a> %0a> CloakHostSalt: We will cloak the host using a unique salt; contact another sysadmin for the exact salt. For a Practice VPS or if not linking to a network, you can leave it commented for a random Salt each time it runs or you can provide your own random Salt%0a> %0a> DefaultUserModes: UserMode +i keeps the user invisible, and +C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. %0a> %0a> NoticeBeforeRegistration: Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. We're going to log using syslog (see section below).%0a> %0a140,143c141,142%0a%3c This entire block should be commented. When you are ready to set up [[ngircd/ssl|SSL/TLS encryption]], un-comment the entire block.%0a%3c %0a%3c '''WARNING''': Do not send passwords or sensitive data over this server until SSL is set up.%0a%3c %0a---%0a> This entire block is commented, when you are ready to set up [[ngircd/ssl|SSL/TLS encryption]], un-comment it and follow the instructions on the SSL page. '''Note''': do not send passwords/sensitive data over IRC to this server until SSL is set up %0a> %0a150,151c149,150%0a%3c Name = username%0a%3c Password = password%0a---%0a> Name = %3cusername>%0a> Password = %3cpassword>%0a154,155c153,156%0a%3c Please use a [[password/management|long, random string]] for your password.%0a%3c %0a---%0a> Name: your IRC username%0a> %0a> Password: Please use a [[password/management|long, random string]] for your password.%0a> %0a172,173c173,174%0a%3c Create the Message of the Day in /etc/ngircd/ngircd.motd. Here is a suggested template:%0a%3c %0a---%0a> Paste your Message of the Day in /etc/ngircd/ngircd.motd. Here's a suggested template:%0a> %0a179c180%0a%3c * No porn / illegal drugs / threats of violence%0a---%0a> * No porn / illegal drugs / promotion of violence%0a191a193%0a> %0a194,195c196,197%0a%3c All log messages from ngircd should go to [@ /var/log/ngircd.log @]. Insert these three lines starting at line 3 (at the top) in [@/etc/syslog.conf@]:%0a%3c %0a---%0a> You want all the log messages from ngircd (Errors, system reports) to go to [@ /var/log/ngircd.log @] and not anywhere else, so we insert these three lines starting at line 3 (from the top) in [@ /etc/syslog.conf @]:%0a> %0a202,203c204,205%0a%3c This directs all logs from ngircd to go straight to /var/log/ngircd.log.%0a%3c %0a---%0a> This directs all logs from ngircd to go straight to /var/log/ngircd.log and nowhere else.%0a> %0a213,214c215%0a%3c We need to set up the [[chroot/intro|chroot]] for ngircd. Let's copy the files into the chroot:%0a%3c %0a---%0a> We need to set up the [[openbsd/chroot|chroot]] for ngircd. Let's copy the files into the chroot:%0a235c236,237%0a%3c Next, use your IRC client to connect to the server. Join a few channels and chat inside.%0a---%0a> Next, use your IRC client to connect to the server, which may have the hostname [@ %3cuser>.%3cfruit>.ircnow.org @]. %0a> Join a few channels and chat inside.%0a
133
2023-01-22
diff:1631956282:1631956227:=66,67c66,67%0a%3c *Name: Use your server's domain name.%0a%3c *Info: Use your server's domain name.%0a---%0a> Name: Use your server's domain name.%0a> Info: Use your server's domain name%0a
136
2023-01-22
diff:1631956227:1631955807:=54a55%0a> %0a59,63c60,64%0a%3c Name = irc.example.com%0a%3c AdminInfo1 = Example Network%0a%3c AdminInfo2 = Planet Earth%0a%3c AdminEMail = admin@example.com%0a%3c Info = irc.example.com%0a---%0a> Name = %3circ.example.com>%0a> AdminInfo1 = %3cExample Network>%0a> AdminInfo2 = %3cPlanet Earth>%0a> AdminEMail = %3cadmin@example.com>%0a> Info = %3cusername.fruit.ircnow.org>%0a66,68c67,76%0a%3c Name: Use your server's domain name.%0a%3c Info: Use your server's domain name%0a%3c %0a---%0a> Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a> %0a> AdminInfo1: provide a description of your IRC server.%0a> %0a> AdminInfo2: provide the location%0a> %0a> AdminEmail: your Email where bug reports and complaints may be sent%0a> %0a> Info: your server's domain name%0a> %0a70c78%0a%3c Listen = 127.0.0.1,192.168.1.1,2001:db8::%0a---%0a> Listen = 127.0.0.1,%3c192.168.1.1>,%3c2001:db8::>%0a152a161%0a> %0a171a181%0a> %0a
139
2023-01-22
diff:1631955807:1631253991:=3,4c3,10%0a%3c In this guide, we'll setup [[https://ngircd.barton.de/documentation.php.en|ngircd]], a free, portable, lightweight IRC server.%0a%3c %0a---%0a> %0a> %0a> %0a> %0a> In this guide, we'll setup ngircd, a free, portable, lightweight IRC server.%0a> %0a> %0a> %0a7,13c13,21%0a%3c ngircd is an [[IRC/Guide|IRC]] server. It helps IRC clients send messages to one another.%0a%3c %0a%3c Advantages:%0a%3c %0a%3c # The source code is written in modern, portable C.%0a%3c # The code compiles easily on all BSDs, Linux, and other platforms.%0a%3c # The code is easy to fork to add new features such as spam filters%0a---%0a> %0a> ngircd is an IRC (Internet Relay Chat) server. It connects IRC clients (such as hexchat, irssi, etc) and transfers messages between them. In this article, we will set up ngircd so that irc clents can connect to it and communicate with each other.%0a> %0a> %0a> %0a> %0a> There are many irc servers we could have used, but the advantages of using ngircd are:%0a> %0a> # The source code runs well on OpenBSD%0a15c23%0a%3c # Documentation is short and easy to understand%0a---%0a> # Fewer features means the manual pages are short%0a16a25,27%0a> # The source code is written in modern, portable C. It will be easy to fork to new features such as:%0a> # Customized censorship to block NSFW content%0a> # Spam filters%0a18a30,33%0a> %0a> %0a> %0a> %0a21,22c36,43%0a%3c # [[https://ngircd.barton.de/documentation.php.en|Official ngIRCd documentation]] %0a%3c %0a---%0a> %0a> #official [[https://ngircd.barton.de/documentation.php.en|ngIRCd documentation]] %0a> %0a> #read the man pages%0a> %0a> %0a> %0a> %0a24a46,50%0a> %0a> %0a> %0a> %0a> %0a26a53,55%0a> %0a> Install ngircd%0a> %0a29,30c58,59%0a%3c Copy the sample configuration file:%0a%3c %0a---%0a> Copy the sample configuration file%0a> %0a34,39c63,71%0a%3c ngIRCd v26.1 provided by OpenBSD 6.9 ports does not have ident support. On a production server, ident support is essential, so we will need to compile from source (described below). You will want to do this after installing from packages, so that rc.d scripts are created automatically.%0a%3c %0a%3c !!! Installing from source%0a%3c %0a%3c Pull the codebase from IRCNow's file servers, extract the code, and install it%0a%3c %0a---%0a> %0a> %0a> ngIRCd v26.1 provided by OpenBSD 6.9 ports does not have ident support. We need to compile from source to get ident support, which is necessary on a production server. You will want to do this after installing from packages, so that rc.d tags are created properly. It is best to do this now.%0a> %0a> !!! Reinstalling from source%0a> %0a> %0a> Pull the codebase from IRCnow's file servers, extract the code, and install it%0a> %0a41,43c73,75%0a%3c $ ftp https://ircnow.org/software/ngircd.tgz%0a%3c $ tar xvzf ngircd.tgz%0a%3c $ cd ngircd-26.1/%0a---%0a> $ ftp https://ircnow.org/software/ngircd.tgz %0a> $ tar xvzf ngircd.tgz %0a> $ cd ngircd-26.1/ %0a45,48c77,88%0a%3c @]%0a%3c %0a%3c !! Configuring ngircd%0a%3c %0a---%0a> @] %0a> %0a> %0a> %0a> %0a> %0a> %0a> !!Configuring ngircd%0a> %0a> %0a> Now that you have ngircd installed, its time to set it up. When installing, you copied the sample configuration file. Now edit it to make it work for you.%0a> %0a51,52c91,96%0a%3c '''Note''': Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line if that is desired.%0a%3c %0a---%0a> Note you may have to use the [[https://wiki.ircnow.org/index.php?n=Doas.Configure | doas]] command to have write access to the file.%0a> %0a> '''When you see [@%3ctext>@] it indicates that you must replace the text with something that fits your unique situation; do not just copy it in.'''%0a> %0a> '''Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line if that is desired.'''%0a> %0a60,61c104,105%0a%3c Name = %3circ.example.com>%0a%3c AdminInfo1 = %3cExample Network>%0a---%0a> Name = %3cusername.fruit.ircnow.org>%0a> AdminInfo1 = %3cFruit Server on IRCNow>%0a63c107%0a%3c AdminEMail = %3cadmin@example.com>%0a---%0a> AdminEMail = %3cadmin@username.fruit.ircnow.org>%0a66a111%0a> %0a76a122%0a> %0a115a162,163%0a> %0a> %0a205a254%0a> %0a222a272,274%0a> %0a> %0a> %0a224a277%0a> %0a238a292%0a> %0a245a300%0a> %0a250a306%0a> %0a267a324%0a> %0a
142
2023-01-22
diff:1631253991:1630332626:=65c65%0a%3c ngIRCd v26.1 provided by OpenBSD 6.9 ports does not have ident support. We need to compile from source to get ident support, which is necessary on a production server. You will want to do this after installing from packages, so that rc.d tags are created properly. It is best to do this now.%0a---%0a> ngIRCd v26 provided by OpenBSD 6.8 ports does not have ident support. We need to compile from source to get ident support, which is necessary on a production server. You will want to do this after installing from packages, so that rc.d tags are created properly. It is best to do this now.%0a
145
2023-01-22
diff:1630332626:1627916713:=281d280%0a%3c $ doas cp /etc/resolv.conf /var/ngircd/etc/%0a357c356%0a%3c # Configure [[acopm/install|acopm]], a minimalist open proxy monitor to stop spammers.%0a---%0a> # Configure [[acopm/install|acopm]], a minimalist open proxy monitor to stop spammers.%0a\ No newline at end of file%0a
148
2023-01-22
diff:1627916713:1626787596:=292,293c292,293%0a%3c To start ngircd via [[openbsd/rcctl|rcctl]]:%0a%3c %0a---%0a> To start ngircd:%0a> %0a298a299%0a> [[rcctl/rcctl|rcctl]] controls how system daemons are run.%0a
154
2023-01-22
diff:1625883365:1625881706:=218,223d217%0a%3c !!! Server Block%0a%3c [@%0a%3c [Server]%0a%3c @]%0a%3c %0a%3c The server block is used to connect to other servers to form a network. You can have multiple server blocks. See: [[ngircd/link|Link your ngircd]] %0a
157
2023-01-22
diff:1625881706:1625880174:=58,59c58,59%0a%3c Copy the sample configuration file%0a%3c %0a---%0a> copy the sample configuration file into the location where the program can read it (we will edit it to suit our needs)%0a> %0a89c89%0a%3c Edit [@ /etc/ngircd/ngircd.conf @]:%0a---%0a> Use your favorite text editor to edit [@ /etc/ngircd/ngircd.conf @]:%0a
160
2023-01-22
diff:1625880174:1625878603:=140,141d139%0a%3c ServerGID = _ngircd%0a%3c ServerUID = _ngircd%0a145,148d142%0a%3c %0a%3c ServerGID: Uncomment, name (or number) of the Group to run as%0a%3c %0a%3c ServerUID: Uncomment, name (or number) of the User to run as%0a
166
2023-01-22
diff:1625878567:1625878195:=194,195d193%0a%3c %0a%3c You may have as many Operator Blocks as you like, one for each Operator.%0a
169
2023-01-22
diff:1625878195:1625878071:=191c191%0a%3c This entire block is commented, when you are ready to set up [[ngircd/ssl|SSL/TLS encryption]], un-comment it and follow the instructions on the SSL page. '''Note''': do not send passwords/sensitive data over IRC to this server until SSL is set up %0a---%0a> This entire block is commented, when you are ready to set up [[ngircd/ssl|SSL]], un-comment it and follow the instructions on the SSL page.%0a
172
2023-01-22
diff:1625878071:1625877684:=185,191d184%0a%3c !!! SSL block%0a%3c %0a%3c [@ %0a%3c ;[SSL]%0a%3c @]%0a%3c %0a%3c This entire block is commented, when you are ready to set up [[ngircd/ssl|SSL]], un-comment it and follow the instructions on the SSL page.%0a
175
2023-01-22
diff:1625877684:1625877095:=179c179%0a%3c CloakHostSalt: We will cloak the host using a unique salt; contact another sysadmin for the exact salt. For a Practice VPS or if not linking to a network, you can leave it commented for a random Salt each time it runs or you can provide your own random Salt%0a---%0a> CloakHostSalt: We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a
181
2023-01-22
diff:1625877023:1625869975:=139a140,145%0a> MaxConnectionsIP = 0%0a> MaxJoins = 300%0a> MaxNickLength = 16%0a> MaxListSize = 1000%0a> PingTimeout = 300%0a> PongTimeout = 300%0a143,155d148%0a%3c %0a%3c !!! Limits Block%0a%3c %0a%3c [@%0a%3c MaxConnectionsIP = 0%0a%3c MaxJoins = 300%0a%3c MaxNickLength = 16%0a%3c MaxListSize = 1000%0a%3c PingTimeout = 300%0a%3c PongTimeout = 300%0a%3c @]%0a%3c %0a%3c %0a
184
2023-01-22
diff:1625869975:1625867210:=91c91%0a%3c Note you may have to use the [[https://wiki.ircnow.org/index.php?n=Doas.Configure | doas]] command to have write access to the file.%0a---%0a> Note you may have to use the doas command to have write access to the file.%0a
187
2023-01-22
diff:1625867210:1625867173:=318c318%0a%3c '''WARNING''': ngircd appears to have a bug where the ircd will crash if you reload the configuration file while a message is being sent. Be careful to avoid reloading configuration files when many users are chatting.%0a---%0a> '''Warning''': ngircd appears to have a bug where the ircd will crash if you reload the configuration file while a message is being sent. Be careful to avoid reloading configuration files when many users are chatting.%0a
190
2023-01-22
diff:1625867173:1625867124:=308c308%0a%3c '''Reloading''' a configuration file will '''not''' disconnect any active connections. So, try to reload the configuration where possible '''instead of restarting the service'''.%0a---%0a> '''Reloading''' a configuration file will '''not''' disconnect any active connections. So, try to reload the configuration where possible.%0a
193
2023-01-22
diff:1625867124:1625867095:=296c296%0a%3c After you edit [@ /etc/ngircd/ngircd.conf @] for a running ngircd server, you will need to reload the configuration file:%0a---%0a> After you edit /etc/ngircd/ngircd.conf for a running ngircd server, you will need to reload the configuration file:%0a
199
2023-01-22
diff:1625867078:1625867029:=291c291%0a%3c Remember, if you are connecting using port 6667 without SSL, any eavesdropper can read all your text, including your passwords. '''Don't send any sensitive information until you have upgraded to [[ngircd/ssl|SSL]].'''%0a---%0a> Remember, if you are connecting using port 6667 without SSL, any eavesdropper can read all your text, including your passwords. Don't send any sensitive information until you have upgraded to [[ngircd/ssl|SSL]].%0a
202
2023-01-22
diff:1625867029:1625866998:=289c289%0a%3c Check [@ /var/log/ngircd.log @] to see if ngircd is listening on the correct IP addresses and ports. Connect to those ports using your IRC client to verify that the server is working as intended.%0a---%0a> Check /var/log/ngircd.log to see if ngircd is listening on the correct IP addresses and ports. Connect to those ports using your IRC client to verify that the server is working as intended.%0a
208
2023-01-22
diff:1625866962:1625866954:=271,272c271%0a%3c Next, use your IRC client to connect to the server, which may have the hostname [@ %3cuser>.%3cfruit>.ircnow.org @]. %0a%3c Join a few channels and chat inside.%0a---%0a> Next, use your IRC client to connect to the server, which may have the hostname [@ %3cuser>.%3cfruit>.ircnow.org @]. Join a few channels and chat inside.%0a
211
2023-01-22
diff:1625866954:1625866895:=271c271%0a%3c Next, use your IRC client to connect to the server, which may have the hostname [@ %3cuser>.%3cfruit>.ircnow.org @]. Join a few channels and chat inside.%0a---%0a> Next, use your IRC client to connect to the server, which may have the hostname user.fruit.ircnow.org. Join a few channels and chat inside.%0a
217
2023-01-22
diff:1625866831:1625866757:=247d246%0a%3c %0a248a248%0a> if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a
223
2023-01-22
diff:1625866748:1625866700:=222,224c222,224%0a%3c !! Configuring syslog%0a%3c %0a%3c You want all the log messages from ngircd (Errors, system reports) to go to [@ /var/log/ngircd.log @] and not anywhere else, so we insert these three lines starting at line 3 (from the top) in [@ /etc/syslog.conf @]:%0a---%0a> !!! Configuring syslog%0a> %0a> You want all the log messages from ngircd (Errors, system reports) to go to [@ /var/log/ngircd.log @] and not anywhere else, so we insert these three lines starting at line 3 (at the top) in [@ /etc/syslog.conf @]:%0a
226
2023-01-22
diff:1625866700:1625866675:=224c224%0a%3c You want all the log messages from ngircd (Errors, system reports) to go to [@ /var/log/ngircd.log @] and not anywhere else, so we insert these three lines starting at line 3 (at the top) in [@ /etc/syslog.conf @]:%0a---%0a> You want all the log messages from ngircd (Errors, system reports) to go to [@ /var/log/ngircd.log @] and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a
229
2023-01-22
diff:1625866675:1625866591:=224c224%0a%3c You want all the log messages from ngircd (Errors, system reports) to go to [@ /var/log/ngircd.log @] and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a---%0a> You want all the messages from ngircd to go to /var/log/ngircd.log and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a
232
2023-01-22
diff:1625866591:1625866542:=195,196d194%0a%3c %0a%3c You are finished editing ngircd.conf%0a
235
2023-01-22
diff:1625866542:1625866371:=196c196%0a%3c !!MOTD file%0a---%0a> !!!MOTD file%0a
238
2023-01-22
diff:1625866371:1625866117:=91,92c91,94%0a%3c Note you may have to use the doas command to have write access to the file.%0a%3c %0a---%0a> We use the doas command to have all privs to edit the file. You might not have permission to write to the file without doas.%0a> %0a> As you go through the configuration file, find the sections listed below, and change their contents to match the values listed here.%0a> %0a136,137c138,139%0a%3c Network: IRCNow, or your network (Liberachat, freenode, etc...)%0a%3c %0a---%0a> Network: IRCnow, or your network (Liberachat, freenode, etc...)%0a> %0a148c150%0a%3c Ports: listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls (censorship). %0a---%0a> Ports: listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. %0a
241
2023-01-22
diff:1625866117:1625866092:=89c89%0a%3c Use your favorite text editor to edit [@ /etc/ngircd/ngircd.conf @]:%0a---%0a> Use your favorite text editor to edit /etc/ngircd/ngircd.conf:%0a
244
2023-01-22
diff:1625866092:1625866084:=89c89%0a%3c Use your favorite text editor to edit /etc/ngircd/ngircd.conf:%0a---%0a> use your favorite text editor to edit /etc/ngircd/ngircd.conf:%0a
247
2023-01-22
diff:1625866084:1625866032:=89c89,95%0a%3c use your favorite text editor to edit /etc/ngircd/ngircd.conf:%0a---%0a> Edit /etc/ngircd/ngircd.conf:%0a> %0a> Use your favorite text editor; for example:%0a> to use vi, %0a> [@ $ doas vi /etc/ngircd/ngircd.conf @] %0a> or to use vim,%0a> [@ $ doas vim /etc/ngircd/ngircd.conf @] %0a
250
2023-01-22
diff:1625866032:1625233534:=87c87%0a%3c Now that you have ngircd installed, its time to set it up. When installing, you copied the sample configuration file. Now edit it to make it work for you.%0a---%0a> Now that we have ngircd installed, its time to set it up. When installing, we copied the sample configuration file. We will now edit it to make it work for us.%0a
253
2023-01-22
diff:1625233534:1625231673:=33c33,35%0a%3c %0a---%0a> ----%0a> %0a> %0a43a46,48%0a> %0a> ----%0a> %0a56,57c61,62%0a%3c [@$ doas pkg_add ngircd @]%0a%3c %0a---%0a> -> [@$ doas pkg_add ngircd @]%0a> %0a60c65%0a%3c [@$ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a---%0a> ->[@$ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a72c77%0a%3c [@ %0a---%0a> ->[@ %0a83a89,90%0a> ----%0a> %0a91,107c98,114%0a%3c Use your favorite text editor; for example:%0a%3c to use vi, %0a%3c [@ $ doas vi /etc/ngircd/ngircd.conf @] %0a%3c or to use vim,%0a%3c [@ $ doas vim /etc/ngircd/ngircd.conf @] %0a%3c %0a%3c We use the doas command to have all privs to edit the file. You might not have permission to write to the file without doas.%0a%3c %0a%3c As you go through the configuration file, find the sections listed below, and change their contents to match the values listed here.%0a%3c %0a%3c '''When you see [@%3ctext>@] it indicates that you must replace the text with something that fits your unique situation; do not just copy it in.'''%0a%3c %0a%3c '''Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line if that is desired.'''%0a%3c %0a%3c Typically, ";" precedes a line of code that has been commented, while a "#" precedes an actual note that should not be uncommented.%0a%3c %0a%3c %0a---%0a> ->Use your favorite text editor; for example:%0a> -->to use vi, %0a> --->[@ $ doas vi /etc/ngircd/ngircd.conf @] %0a> -->or to use vim,%0a> --->[@ $ doas vim /etc/ngircd/ngircd.conf @] %0a> %0a> ->We use the doas command to have all privs to edit the file. You might not have permission to write to the file without doas.%0a> %0a> ->As you go through the configuration file, find the sections listed below, and change their contents to match the values listed here.%0a> %0a> ->'''When you see [@%3ctext>@] it indicates that you must replace the text with something that fits your unique situation; do not just copy it in.'''%0a> %0a> ->'''Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line if that is desired.'''%0a> %0a> ->Typically, ";" precedes a line of code that has been commented, while a "#" precedes an actual note that should not be uncommented.%0a> %0a> %0a120,130c127,137%0a%3c Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a%3c %0a%3c AdminInfo1: provide a description of your IRC server.%0a%3c %0a%3c AdminInfo2: provide the location%0a%3c %0a%3c AdminEmail: your Email where bug reports and complaints may be sent%0a%3c %0a%3c Info: your server's domain name%0a%3c %0a%3c %0a---%0a> --->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a> %0a> --->AdminInfo1: provide a description of your IRC server.%0a> %0a> --->AdminInfo2: provide the location%0a> %0a> --->AdminEmail: your Email where bug reports and complaints may be sent%0a> %0a> --->Info: your server's domain name%0a> %0a> %0a135,136c142,143%0a%3c Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted. '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a%3c %0a---%0a> --->Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted. '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a> %0a142,145c149,152%0a%3c Motdfile: Stands for "Message of the Day", we will create this at that file location later on.%0a%3c %0a%3c Network: IRCnow, or your network (Liberachat, freenode, etc...)%0a%3c %0a---%0a> --->Motdfile: Stands for "Message of the Day", we will create this at that file location later on.%0a> %0a> --->Network: IRCnow, or your network (Liberachat, freenode, etc...)%0a> %0a156,159c163,166%0a%3c Ports: listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. %0a%3c %0a%3c MaxNickLength: '''must''' be identical to all servers on the network. On IRCNow, MaxNickLength is [@16@].%0a%3c %0a---%0a> --->Ports: listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. %0a> %0a> --->MaxNickLength: '''must''' be identical to all servers on the network. On IRCNow, MaxNickLength is [@16@].%0a> %0a175c182%0a%3c AllowRemoteOper: For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server.%0a---%0a> --->AllowRemoteOper: For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server.%0a177,185c184,192%0a%3c ChrootDir: We want to [[Chroot.Intro|chroot]] to /var/ngircd to prevent a security compromise. %0a%3c %0a%3c CloakHostSalt: We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a%3c %0a%3c DefaultUserModes: UserMode +i keeps the user invisible, and +C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. %0a%3c %0a%3c NoticeBeforeRegistration: Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. We're going to log using syslog (see section below).%0a%3c %0a%3c %0a---%0a> --->ChrootDir: We want to [[Chroot.Intro|chroot]] to /var/ngircd to prevent a security compromise. %0a> %0a> --->CloakHostSalt: We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a> %0a> --->DefaultUserModes: UserMode +i keeps the user invisible, and +C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. %0a> %0a> --->NoticeBeforeRegistration: Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. We're going to log using syslog (see section below).%0a> %0a> %0a195,196c202,203%0a%3c Name: your IRC username%0a%3c Password: Please use a [[password/management|long, random string]] for your password.%0a---%0a> --->Name: your IRC username%0a> --->Password: Please use a [[password/management|long, random string]] for your password.%0a
256
2023-01-22
diff:1625231673:1625230726:=11,13c11,13%0a%3c !!Theory%0a%3c %0a%3c %0a---%0a> !!!Theory%0a> %0a> %0a36,38c36,38%0a%3c !!Docs and references%0a%3c %0a%3c %0a---%0a> !!!Docs and references%0a> %0a> %0a49,58c49,58%0a%3c !!Installation%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c !!! Installing from OpenBSD packages%0a%3c %0a%3c %0a---%0a> !!!Installation%0a> %0a> %0a> %0a> %0a> %0a> %0a> !! Installing from OpenBSD packages%0a> %0a> %0a72,74c72,74%0a%3c !!! Reinstalling from source%0a%3c %0a%3c %0a---%0a> !! Reinstalling from source%0a> %0a> %0a91,93c91,93%0a%3c !!Configuring ngircd%0a%3c %0a%3c %0a---%0a> !!!Configuring ngircd%0a> %0a> %0a115,116c115,116%0a%3c !!! Global Block%0a%3c %0a---%0a> !! Global Block%0a> %0a167,168c167,168%0a%3c !!! Options Block%0a%3c %0a---%0a> !! Options Block%0a> %0a193c193%0a%3c !!! Operator Block%0a---%0a> !! Operator Block%0a
259
2023-01-22
diff:1625230726:1625230483:=5,13c5,15%0a%3c %0a%3c %0a%3c In this guide, we'll setup ngircd, a free, portable, lightweight IRC server.%0a%3c %0a%3c %0a%3c %0a%3c !!!Theory%0a%3c %0a%3c %0a---%0a> ----%0a> %0a> %0a> %25center%25In this guide, we'll setup ngircd, a free, portable, lightweight IRC server.%0a> %0a> ----%0a> %0a> %0a> %25center%25'+'''Theory'''+'%0a> %0a> %0a36,38c38,40%0a%3c !!!Docs and references%0a%3c %0a%3c %0a---%0a> %25center%25'+'''Docs and references'''+'%0a> %0a> %0a49,58c51,60%0a%3c !!!Installation%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c !! Installing from OpenBSD packages%0a%3c %0a%3c %0a---%0a> %25center%25'+'''Installation'''+'%0a> %0a> %0a> %0a> %0a> %0a> %0a> !!! Installing from OpenBSD packages%0a> %0a> %0a72,74c74,76%0a%3c !! Reinstalling from source%0a%3c %0a%3c %0a---%0a> !!! Reinstalling from source%0a> %0a> %0a91,93c93,95%0a%3c !!!Configuring ngircd%0a%3c %0a%3c %0a---%0a> %25center%25'+'''Configuring ngircd'''+'%0a> %0a> %0a115,116c117,118%0a%3c !! Global Block%0a%3c %0a---%0a> !!! Global Block%0a> %0a167,168c169,170%0a%3c !! Options Block%0a%3c %0a---%0a> !!! Options Block%0a> %0a193c195%0a%3c !! Operator Block%0a---%0a> !!! Operator Block%0a
262
2023-01-22
diff:1625230483:1625060991:=200c200%0a%3c Password = %3cpassword>%0a---%0a> Password = password%0a205c205,206%0a%3c --->Password: Please use a [[password/management|long, random string]] for your password.%0a---%0a> --->%0a> Please use a [[password/management|long, random string]] for your password.%0a
265
2023-01-22
diff:1625060991:1625060312:=43c43,48%0a%3c #read the man pages%0a---%0a> #read the man pages:%0a> %0a> ->[@ $ man ngircd @]%0a> %0a> %0a> %0a
268
2023-01-22
diff:1625060312:1625060136:=40a41,43%0a> %0a> Getting to know the documentation is important! Before you begin, at least look over the documentation. It will begin to make sense as you use ngircd, and the man pages will eventually become your best friend when you run into errors. Don't understand it yet? Thats ok; Familiarity breeds understanding.%0a> %0a43c46,47%0a%3c #read the man pages:%0a---%0a> #read the man pages: in your terminal, after you install ngircd,%0a> %0a
271
2023-01-22
diff:1625060136:1625060108:=85,86c85%0a%3c %0a%3c Pull the codebase from IRCnow's file servers, extract the code, and install it%0a---%0a> 1. pull the codebase from IRCnow's file servers, extract the code, and install it%0a
274
2023-01-22
diff:1625060108:1625059326:=85,92c85,99%0a%3c 1. pull the codebase from IRCnow's file servers, extract the code, and install it%0a%3c %0a%3c ->[@ %0a%3c $ ftp https://ircnow.org/software/ngircd.tgz %0a%3c $ tar xvzf ngircd.tgz %0a%3c $ cd ngircd-26.1/ %0a%3c $ sh build.sh %0a%3c @] %0a---%0a> 1. pull the codebase from IRCnow's file servers%0a> %0a> ->[@ $ ftp https://ircnow.org/software/ngircd.tgz @]%0a> %0a> 2. extract the code from the compressed tarball %0a> %0a> ->[@ $ tar xvzf ngircd.tgz @] %0a> %0a> 3. change directory into the newly uncompressed folder %0a> %0a> ->[@ $ cd ngircd-26.1/ @] %0a> %0a> 4. run the shell script "build.sh" found there, which will reinstall from source %0a> %0a> ->[@ $ sh build.sh @] %0a
277
2023-01-22
diff:1625059326:1625056854:=16,20c16,20%0a%3c ngircd is an IRC (Internet Relay Chat) server. It connects IRC clients (such as hexchat, irssi, etc) and transfers messages between them. In this article, we will set up ngircd so that irc clents can connect to it and communicate with each other.%0a%3c %0a%3c %0a%3c %0a%3c %0a---%0a> ngircd is an IRC (Internet Relay Chat) server. Irc is comprised of a server-client model. The client (such as hexchat, irssi, etc) can receive messages from the server and send messages to the server, but the server connects all the clients and transfers messages between them. In this article, we will set up ngircd so that irc clents can connect to it and communicate with each other.%0a> %0a> %0a> %0a> %0a220c220%0a%3c --->%0a---%0a> ----%0a
280
2023-01-22
diff:1625056854:1625056833:=159c159%0a%3c --->Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted. '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a---%0a> --->Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.'''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a
283
2023-01-22
diff:1625056833:1625055431:=159,160c159,162%0a%3c --->Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.'''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a%3c %0a---%0a> --->Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a> %0a> ---->'''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a> %0a214c216%0a%3c Name = %3cusername>%0a---%0a> Name = username%0a218,220d219%0a%3c %0a%3c --->Name: your IRC username%0a%3c ----%0a278c277%0a%3c if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a---%0a> %0a
286
2023-01-22
diff:1625055431:1625055293:=212,213c212,216%0a%3c !!! Operator Block%0a%3c %0a---%0a> !!!MOTD file%0a> %0a> %0a> Paste your Message of the Day in /etc/ngircd/ngircd.motd. Here's a suggested template:%0a> %0a215,217c218,232%0a%3c [Operator]%0a%3c Name = username%0a%3c Password = password%0a---%0a> IRCNow - The Users' Network%0a> %0a> IRCNow is the network of the user, by the user, for the user.%0a> %0a> * No porn / illegal drugs / promotion of violence%0a> * No slander / libel / gambling%0a> * No spam, illegal cracking, or DDoS%0a> * No copyright infrigement%0a> %0a> You must agree to our terms of service and our privacy policy %0a> to use this network:%0a> %0a> https://wiki.ircnow.org/index.php?n=Terms.Terms%0a> %0a> Only 5 connections per IP address. If you need help, please speak with staff on #help.%0a220,232c235,239%0a%3c Please use a [[password/management|long, random string]] for your password.%0a%3c %0a%3c If you uncomment Mask, your hostmask must match the operator hostmask in order for the /OPER command to be accepted. If it differs at all, then your /OPER command will be rejected. If you don't want to check the hostmask, leave Mask commented out.%0a%3c %0a%3c For more security, you can uncomment Mask and have it match your vhost. However, please be aware that this will make it impossible to authenticate if you ever have to connect from a different IP address.%0a%3c %0a%3c %0a%3c %0a%3c !!!MOTD file%0a%3c %0a%3c %0a%3c Paste your Message of the Day in /etc/ngircd/ngircd.motd. Here's a suggested template:%0a%3c %0a---%0a> %0a> !!! Configuring syslog%0a> %0a> You want all the messages from ngircd to go to /var/log/ngircd.log and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a> %0a234,248c241,243%0a%3c IRCNow - The Users' Network%0a%3c %0a%3c IRCNow is the network of the user, by the user, for the user.%0a%3c %0a%3c * No porn / illegal drugs / promotion of violence%0a%3c * No slander / libel / gambling%0a%3c * No spam, illegal cracking, or DDoS%0a%3c * No copyright infrigement%0a%3c %0a%3c You must agree to our terms of service and our privacy policy %0a%3c to use this network:%0a%3c %0a%3c https://wiki.ircnow.org/index.php?n=Terms.Terms%0a%3c %0a%3c Only 5 connections per IP address. If you need help, please speak with staff on #help.%0a---%0a> !!ngircd%0a> *.* /var/log/ngircd.log%0a> !*%0a251,255c246,249%0a%3c %0a%3c !!! Configuring syslog%0a%3c %0a%3c You want all the messages from ngircd to go to /var/log/ngircd.log and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a%3c %0a---%0a> This directs all logs from ngircd to go straight to /var/log/ngircd.log and nowhere else.%0a> %0a> Next, create the file /var/log/ngircd.log and restart syslogd:%0a> %0a257,259c251,252%0a%3c !!ngircd%0a%3c *.* /var/log/ngircd.log%0a%3c !*%0a---%0a> $ doas touch /var/log/ngircd.log%0a> $ doas rcctl restart syslogd%0a262,265c255,256%0a%3c This directs all logs from ngircd to go straight to /var/log/ngircd.log and nowhere else.%0a%3c %0a%3c Next, create the file /var/log/ngircd.log and restart syslogd:%0a%3c %0a---%0a> !!! Operator Block%0a> %0a267,268c258,260%0a%3c $ doas touch /var/log/ngircd.log%0a%3c $ doas rcctl restart syslogd%0a---%0a> [Operator]%0a> Name = username%0a> Password = password%0a270a263,267%0a> Please use a [[password/management|long, random string]] for your password.%0a> %0a> If you uncomment Mask, your hostmask must match the operator hostmask in order for the /OPER command to be accepted. If it differs at all, then your /OPER command will be rejected. If you don't want to check the hostmask, leave Mask commented out.%0a> %0a> For more security, you can uncomment Mask and have it match your vhost. However, please be aware that this will make it impossible to authenticate if you ever have to connect from a different IP address.%0a
289
2023-01-22
diff:1625055293:1625054364:=1,4c1,4%0a%3c (:title Ngircd Install Guide:)%0a%3c %0a%3c %0a%3c %0a---%0a> %25center%25(:title Ngircd Install Guide:)%0a> %0a> %0a> %0a203,204c203%0a%3c --->ChrootDir: We want to [[Chroot.Intro|chroot]] to /var/ngircd to prevent a security compromise. %0a%3c %0a---%0a> --->ChrootDir: We want to chroot to /var/ngircd to prevent a security compromise. %0a207,209c206%0a%3c --->DefaultUserModes: UserMode +i keeps the user invisible, and +C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. %0a%3c %0a%3c --->NoticeBeforeRegistration: Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. We're going to log using syslog (see section below).%0a---%0a> UserMode +i keeps the user invisible, and +C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. We're going to log using syslog (see section below).%0a
292
2023-01-22
diff:1625054364:1625054290:=203,204c203%0a%3c --->ChrootDir: We want to chroot to /var/ngircd to prevent a security compromise. %0a%3c --->CloakHostSalt: We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a---%0a> --->ChrootDir: We want to chroot to /var/ngircd to prevent a security compromise. We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a
295
2023-01-22
diff:1625054290:1625054230:=193c193%0a%3c CloakHostSalt = %3cabcdefghijklmnopqrstuvwxyz>%0a---%0a> CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a
298
2023-01-22
diff:1625054230:1625054213:=201,202c201%0a%3c --->AllowRemoteOper: For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server.%0a%3c %0a---%0a> --->AllowRemoteOper: For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server. %0a
301
2023-01-22
diff:1625054213:1625053351:=201,202c201%0a%3c --->AllowRemoteOper: For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server. %0a%3c --->ChrootDir: We want to chroot to /var/ngircd to prevent a security compromise. We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a---%0a> For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server. We want to chroot to /var/ngircd to prevent a security compromise. We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a
307
2023-01-22
diff:1625053318:1625053282:=181c181%0a%3c --->Ports: listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. %0a---%0a> --->Ports:listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. %0a
310
2023-01-22
diff:1625053282:1625053102:=181,182c181%0a%3c --->Ports:listed are the default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. %0a%3c --->MaxNickLength: '''must''' be identical to all servers on the network. On IRCNow, MaxNickLength is [@16@].%0a---%0a> The above are default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. Note that the MaxNickLength must be identical to all servers on the network. On IRCNow, MaxNickLength is 16.%0a
313
2023-01-22
diff:1625053102:1625052936:=168,169d167%0a%3c --->Motdfile: Stands for "Message of the Day", we will create this at that file location later on.%0a%3c --->Network: IRCnow, or your network (Liberachat, freenode, etc...)%0a
316
2023-01-22
diff:1625052936:1625052913:=164,165c164,165%0a%3c MotdFile = /etc/ngircd/ngircd.motd%0a%3c Network = IRCNow%0a---%0a> MotdFile = /etc/ngircd/ngircd.motd%0a> Network = IRCNow%0a
319
2023-01-22
diff:1625052913:1625052885:=161c161%0a%3c ---->'''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a---%0a> '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a
322
2023-01-22
diff:1625052885:1625052855:=159c159%0a%3c --->Listen: Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a---%0a> --->Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a
325
2023-01-22
diff:1625052855:1625052777:=159c159%0a%3c --->Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a---%0a> ->Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a
328
2023-01-22
diff:1625052777:1625052767:=144c144%0a%3c --->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a---%0a> ---->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a
331
2023-01-22
diff:1625052767:1625052738:=144c144%0a%3c ---->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a---%0a> -->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a
334
2023-01-22
diff:1625052738:1625052728:=146,152c146,152%0a%3c --->AdminInfo1: provide a description of your IRC server.%0a%3c %0a%3c --->AdminInfo2: provide the location%0a%3c %0a%3c --->AdminEmail: your Email where bug reports and complaints may be sent%0a%3c %0a%3c --->Info: your server's domain name%0a---%0a> -->AdminInfo1: provide a description of your IRC server.%0a> %0a> -->AdminInfo2: provide the location%0a> %0a> -->AdminEmail: your Email where bug reports and complaints may be sent%0a> %0a> -->Info: your server's domain name%0a
337
2023-01-22
diff:1625052728:1625052654:=144,152c144,152%0a%3c -->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a%3c %0a%3c -->AdminInfo1: provide a description of your IRC server.%0a%3c %0a%3c -->AdminInfo2: provide the location%0a%3c %0a%3c -->AdminEmail: your Email where bug reports and complaints may be sent%0a%3c %0a%3c -->Info: your server's domain name%0a---%0a> ->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a> %0a> ->AdminInfo1: provide a description of your IRC server.%0a> %0a> ->AdminInfo2: provide the location%0a> %0a> ->AdminEmail: your Email where bug reports and complaints may be sent%0a> %0a> ->Info: your server's domain name%0a
340
2023-01-22
diff:1625052654:1625052551:=115,116c115,116%0a%3c ->Use your favorite text editor; for example:%0a%3c -->to use vi, %0a---%0a> ->Use your favorite text editor; %0a> -->to use vi, for example:%0a121,123c121,123%0a%3c ->We use the doas command to have all privs to edit the file. You might not have permission to write to the file without doas.%0a%3c %0a%3c ->As you go through the configuration file, find the sections listed below, and change their contents to match the values listed here.%0a---%0a> ->We use the doas command to have all privs to edit the file. ->You might not have permission to write to the file without ->doas.%0a> %0a> ->As you go through the configuration file, find the sections ->listed below, and change their contents to match the values ->listed here.%0a
343
2023-01-22
diff:1625052551:1625052534:=117c117%0a%3c --->[@ $ doas vi /etc/ngircd/ngircd.conf @] %0a---%0a> --->[@ doas vi /etc/ngircd/ngircd.conf @] %0a119c119%0a%3c --->[@ $ doas vim /etc/ngircd/ngircd.conf @] %0a---%0a> --->[@ doas vim /etc/ngircd/ngircd.conf @] %0a
346
2023-01-22
diff:1625052534:1625052505:=117,119c117,119%0a%3c --->[@ doas vi /etc/ngircd/ngircd.conf @] %0a%3c -->or to use vim,%0a%3c --->[@ doas vim /etc/ngircd/ngircd.conf @] %0a---%0a> ->[@ doas vi /etc/ngircd/ngircd.conf @] %0a> ->or to use vim,%0a> ->[@ doas vim /etc/ngircd/ngircd.conf @] %0a
349
2023-01-22
diff:1625052505:1625052489:=116c116%0a%3c -->to use vi, for example:%0a---%0a> ->to use vi, for example:%0a
352
2023-01-22
diff:1625052489:1625052381:=115,123c115,123%0a%3c ->Use your favorite text editor; %0a%3c ->to use vi, for example:%0a%3c ->[@ doas vi /etc/ngircd/ngircd.conf @] %0a%3c ->or to use vim,%0a%3c ->[@ doas vim /etc/ngircd/ngircd.conf @] %0a%3c %0a%3c ->We use the doas command to have all privs to edit the file. ->You might not have permission to write to the file without ->doas.%0a%3c %0a%3c ->As you go through the configuration file, find the sections ->listed below, and change their contents to match the values ->listed here.%0a---%0a> Use your favorite text editor; %0a> to use vi, for example:%0a> [@ doas vi /etc/ngircd/ngircd.conf @] %0a> or to use vim,%0a> [@ doas vim /etc/ngircd/ngircd.conf @] %0a> %0a> We use the doas command to have all privs to edit the file. You might not have permission to write to the file without doas.%0a> %0a> As you go through the configuration file, find the sections listed below, and change their contents to match the values listed here.%0a
355
2023-01-22
diff:1625052381:1625052351:=85,86c85,86%0a%3c 1. pull the codebase from IRCnow's file servers%0a%3c %0a---%0a> # pull the codebase from IRCnow's file servers%0a> %0a89,90c89,90%0a%3c 2. extract the code from the compressed tarball %0a%3c %0a---%0a> # extract the code from the compressed tarball %0a> %0a93,94c93,94%0a%3c 3. change directory into the newly uncompressed folder %0a%3c %0a---%0a> # change directory into the newly uncompressed folder %0a> %0a97c97%0a%3c 4. run the shell script "build.sh" found there, which will reinstall from source %0a---%0a> # run the shell script "build.sh" found there, which will reinstall from source %0a
358
2023-01-22
diff:1625052351:1625052301:=87,88c87,88%0a%3c ->[@ $ ftp https://ircnow.org/software/ngircd.tgz @]%0a%3c %0a---%0a> [@ $ ftp https://ircnow.org/software/ngircd.tgz @]%0a> %0a91,92c91,92%0a%3c ->[@ $ tar xvzf ngircd.tgz @] %0a%3c %0a---%0a> [@ $ tar xvzf ngircd.tgz @] %0a> %0a95,96c95,96%0a%3c ->[@ $ cd ngircd-26.1/ @] %0a%3c %0a---%0a> [@ $ cd ngircd-26.1/ @] %0a> %0a99c99%0a%3c ->[@ $ sh build.sh @] %0a---%0a> [@ $ sh build.sh @] %0a
361
2023-01-22
diff:1625052301:1624972917:=85,99c85,88%0a%3c # pull the codebase from IRCnow's file servers%0a%3c %0a%3c [@ $ ftp https://ircnow.org/software/ngircd.tgz @]%0a%3c %0a%3c # extract the code from the compressed tarball %0a%3c %0a%3c [@ $ tar xvzf ngircd.tgz @] %0a%3c %0a%3c # change directory into the newly uncompressed folder %0a%3c %0a%3c [@ $ cd ngircd-26.1/ @] %0a%3c %0a%3c # run the shell script "build.sh" found there, which will reinstall from source %0a%3c %0a%3c [@ $ sh build.sh @] %0a---%0a> [@ $ ftp https://ircnow.org/software/ngircd.tgz @] # pull the codebase from IRCnow's file servers%0a> [@ $ tar xvzf ngircd.tgz @] # extract the code from the compressed tarball%0a> [@ $ cd ngircd-26.1/ @] # change directory into the newly uncompressed folder%0a> [@ $ sh build.sh @] # run the shell script "build.sh" found there, which will reinstall from source%0a
364
2023-01-22
diff:1624972917:1624968302:=5,22c5,10%0a%3c ----%0a%3c %0a%3c %0a%3c %25center%25In this guide, we'll setup ngircd, a free, portable, lightweight IRC server.%0a%3c %0a%3c ----%0a%3c %0a%3c %0a%3c %25center%25'+'''Theory'''+'%0a%3c %0a%3c %0a%3c ngircd is an IRC (Internet Relay Chat) server. Irc is comprised of a server-client model. The client (such as hexchat, irssi, etc) can receive messages from the server and send messages to the server, but the server connects all the clients and transfers messages between them. In this article, we will set up ngircd so that irc clents can connect to it and communicate with each other.%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c There are many irc servers we could have used, but the advantages of using ngircd are:%0a%3c %0a---%0a> In this guide, we'll setup ngircd, a free, portable, lightweight IRC server.%0a> %0a> %0a> %0a> Advantages:%0a> %0a32,76c20,28%0a%3c %0a%3c %0a%3c %0a%3c ----%0a%3c %0a%3c %0a%3c %25center%25'+'''Docs and references'''+'%0a%3c %0a%3c %0a%3c %0a%3c Getting to know the documentation is important! Before you begin, at least look over the documentation. It will begin to make sense as you use ngircd, and the man pages will eventually become your best friend when you run into errors. Don't understand it yet? Thats ok; Familiarity breeds understanding.%0a%3c %0a%3c #official [[https://ngircd.barton.de/documentation.php.en|ngIRCd documentation]] %0a%3c %0a%3c #read the man pages: in your terminal, after you install ngircd,%0a%3c %0a%3c %0a%3c ->[@ $ man ngircd @]%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c ----%0a%3c %0a%3c %25center%25'+'''Installation'''+'%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c !!! Installing from OpenBSD packages%0a%3c %0a%3c %0a%3c Install ngircd%0a%3c %0a%3c -> [@$ doas pkg_add ngircd @]%0a%3c %0a%3c copy the sample configuration file into the location where the program can read it (we will edit it to suit our needs)%0a%3c %0a%3c ->[@$ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a---%0a> Before you begin, please read the official [[https://ngircd.barton.de/documentation.php.en|ngIRCd documentation]] and its man pages.%0a> %0a> !! Installation%0a> %0a> !!! From packages%0a> %0a> [@%0a> $ doas pkg_add ngircd%0a> $ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a79,101c31,43%0a%3c %0a%3c %0a%3c ngIRCd v26 provided by OpenBSD 6.8 ports does not have ident support. We need to compile from source to get ident support, which is necessary on a production server. You will want to do this after installing from packages, so that rc.d tags are created properly. It is best to do this now.%0a%3c %0a%3c !!! Reinstalling from source%0a%3c %0a%3c [@ $ ftp https://ircnow.org/software/ngircd.tgz @] # pull the codebase from IRCnow's file servers%0a%3c [@ $ tar xvzf ngircd.tgz @] # extract the code from the compressed tarball%0a%3c [@ $ cd ngircd-26.1/ @] # change directory into the newly uncompressed folder%0a%3c [@ $ sh build.sh @] # run the shell script "build.sh" found there, which will reinstall from source%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c ----%0a%3c %0a%3c %25center%25'+'''Configuring ngircd'''+'%0a%3c %0a%3c %0a%3c Now that we have ngircd installed, its time to set it up. When installing, we copied the sample configuration file. We will now edit it to make it work for us.%0a%3c %0a---%0a> ngIRCd v26 provided by OpenBSD 6.8 ports does not have ident support. You must eventually compile from source to get ident support, which is necessary on a production server. You will want to do this after installing from packages, so that rc.d tags are created properly.%0a> %0a> !!! From source%0a> %0a> [@%0a> $ ftp https://ircnow.org/software/ngircd.tgz%0a> $ tar xvzf ngircd.tgz%0a> $ cd ngircd-26.1/%0a> $ sh build.sh%0a> @]%0a> %0a> !! Configuration%0a> %0a104,120c46,47%0a%3c Use your favorite text editor; %0a%3c to use vi, for example:%0a%3c [@ doas vi /etc/ngircd/ngircd.conf @] %0a%3c or to use vim,%0a%3c [@ doas vim /etc/ngircd/ngircd.conf @] %0a%3c %0a%3c We use the doas command to have all privs to edit the file. You might not have permission to write to the file without doas.%0a%3c %0a%3c As you go through the configuration file, find the sections listed below, and change their contents to match the values listed here.%0a%3c %0a%3c ->'''When you see [@%3ctext>@] it indicates that you must replace the text with something that fits your unique situation; do not just copy it in.'''%0a%3c %0a%3c ->'''Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line if that is desired.'''%0a%3c %0a%3c ->Typically, ";" precedes a line of code that has been commented, while a "#" precedes an actual note that should not be uncommented.%0a%3c %0a%3c %0a---%0a> '''Note''': Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line.%0a> %0a125,129c52,56%0a%3c Name = %3cusername.fruit.ircnow.org>%0a%3c AdminInfo1 = %3cFruit Server on IRCNow>%0a%3c AdminInfo2 = %3cPlanet Earth>%0a%3c AdminEMail = %3cadmin@username.fruit.ircnow.org>%0a%3c Info = %3cusername.fruit.ircnow.org>%0a---%0a> Name = username.fruit.ircnow.org%0a> AdminInfo1 = Fruit Server on IRCNow%0a> AdminInfo2 = Planet Earth%0a> AdminEMail = admin@username.fruit.ircnow.org%0a> Info = username.fruit.ircnow.org%0a132,143c59,60%0a%3c %0a%3c ->Name: use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. %0a%3c %0a%3c ->AdminInfo1: provide a description of your IRC server.%0a%3c %0a%3c ->AdminInfo2: provide the location%0a%3c %0a%3c ->AdminEmail: your Email where bug reports and complaints may be sent%0a%3c %0a%3c ->Info: your server's domain name%0a%3c %0a%3c %0a---%0a> For Name, use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. For AdminInfo1, provide a description; for AdminInfo2, provide the location.%0a> %0a145c62%0a%3c Listen = 127.0.0.1,%3c192.168.1.1>,%3c2001:db8::>%0a---%0a> Listen = 127.0.0.1,192.168.1.1,2001:db8::%0a148,149c65,66%0a%3c ->Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IPs. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a%3c %0a---%0a> Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IP. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a> %0a157c74,75%0a%3c %0a---%0a> Paste your Message of the Day in /etc/ngircd/ngircd.motd. Here's a suggested template:%0a> %0a158a77,94%0a> IRCNow - The Users' Network%0a> %0a> IRCNow is the network of the user, by the user, for the user.%0a> %0a> * No porn / illegal drugs / promotion of violence%0a> * No slander / libel / gambling%0a> * No spam, illegal cracking, or DDoS%0a> * No copyright infrigement%0a> %0a> You must agree to our terms of service and our privacy policy %0a> to use this network:%0a> %0a> https://wiki.ircnow.org/index.php?n=Terms.Terms%0a> %0a> Only 5 connections per IP address. If you need help, please speak with staff on #help.%0a> @]%0a> %0a> [@%0a189,194c125,128%0a%3c %0a%3c !!!MOTD file%0a%3c %0a%3c %0a%3c Paste your Message of the Day in /etc/ngircd/ngircd.motd. Here's a suggested template:%0a%3c %0a---%0a> !!! Configuring syslog%0a> %0a> You want all the messages from ngircd to go to /var/log/ngircd.log and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a> %0a196,210c130,132%0a%3c IRCNow - The Users' Network%0a%3c %0a%3c IRCNow is the network of the user, by the user, for the user.%0a%3c %0a%3c * No porn / illegal drugs / promotion of violence%0a%3c * No slander / libel / gambling%0a%3c * No spam, illegal cracking, or DDoS%0a%3c * No copyright infrigement%0a%3c %0a%3c You must agree to our terms of service and our privacy policy %0a%3c to use this network:%0a%3c %0a%3c https://wiki.ircnow.org/index.php?n=Terms.Terms%0a%3c %0a%3c Only 5 connections per IP address. If you need help, please speak with staff on #help.%0a---%0a> !!ngircd%0a> *.* /var/log/ngircd.log%0a> !*%0a213,217c135,138%0a%3c %0a%3c !!! Configuring syslog%0a%3c %0a%3c You want all the messages from ngircd to go to /var/log/ngircd.log and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a%3c %0a---%0a> This directs all logs from ngircd to go straight to /var/log/ngircd.log and nowhere else.%0a> %0a> Next, create the file /var/log/ngircd.log and restart syslogd:%0a> %0a219,221c140,141%0a%3c !!ngircd%0a%3c *.* /var/log/ngircd.log%0a%3c !*%0a---%0a> $ doas touch /var/log/ngircd.log%0a> $ doas rcctl restart syslogd%0a224,227c144,145%0a%3c This directs all logs from ngircd to go straight to /var/log/ngircd.log and nowhere else.%0a%3c %0a%3c Next, create the file /var/log/ngircd.log and restart syslogd:%0a%3c %0a---%0a> !!! Operator Block%0a> %0a229,230c147,149%0a%3c $ doas touch /var/log/ngircd.log%0a%3c $ doas rcctl restart syslogd%0a---%0a> [Operator]%0a> Name = username%0a> Password = password%0a233,240d151%0a%3c !!! Operator Block%0a%3c %0a%3c [@%0a%3c [Operator]%0a%3c Name = username%0a%3c Password = password%0a%3c @]%0a%3c %0a246,247d156%0a%3c %0a%3c %0a
367
2023-01-22
diff:1624968302:1620722004:=1,4c1,2%0a%3c %25center%25(:title Ngircd Install Guide:)%0a%3c %0a%3c %0a%3c %0a---%0a> (:title Ngircd Install Guide:)%0a> %0a6,7d3%0a%3c %0a%3c %0a
370
2023-01-22
diff:1620722004:1614857898:=16,17c16,17%0a%3c Before you begin, please read the official [[https://ngircd.barton.de/documentation.php.en|ngIRCd documentation]] and its man pages.%0a%3c %0a---%0a> Before you begin, please read the official [[https://ngircd.barton.de/documentation.php.en|ngIRCd documentation]].%0a> %0a27,28c27,28%0a%3c ngIRCd v26 provided by OpenBSD 6.8 ports does not have ident support. You must eventually compile from source to get ident support, which is necessary on a production server. You will want to do this after installing from packages, so that rc.d tags are created properly.%0a%3c %0a---%0a> ngIRCd v26 provided by OpenBSD 6.8 ports does not have ident support. You must eventually compile from source to get ident support, which is necessary on a production server.%0a> %0a61,62c61,62%0a%3c Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. Replace these with your real public IP. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a%3c %0a---%0a> Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a> %0a119c119%0a%3c UserMode +i keeps the user invisible, and +C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. Receiving a notice before registration can help with debugging with [[netcat/irc|netcat]]. We're going to log using syslog (see section below).%0a---%0a> UserMode i keeps the user invisible, and C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. Receiving a notice before registration can help with debugging with [[openbsd/netcat|netcat]]. We're going to log using syslog (see section below).%0a
373
2023-01-22
diff:1614857898:1612974683:=108a109%0a> CloakHostModeX = jrmu.coconut.ircnow.org%0a
376
2023-01-22
diff:1612974683:1612974683:=1,233d0%0a%3c (:title Ngircd Install Guide:)%0a%3c %0a%3c In this guide, we'll setup ngircd, a free, portable, lightweight IRC server.%0a%3c %0a%3c Advantages:%0a%3c %0a%3c # The source code runs well on OpenBSD%0a%3c # The server has a very simple, easy-to-understand configuration%0a%3c # Fewer features means the manual pages are short%0a%3c # The server is a clean implementation which was written from scratch%0a%3c # The source code is written in modern, portable C. It will be easy to fork to new features such as:%0a%3c # Customized censorship to block NSFW content%0a%3c # Spam filters%0a%3c # The lead developer po||ux actively hangs out on the IRC server barton.ngircd.de on #ngircd%0a%3c %0a%3c Before you begin, please read the official [[https://ngircd.barton.de/documentation.php.en|ngIRCd documentation]].%0a%3c %0a%3c !! Installation%0a%3c %0a%3c !!! From packages%0a%3c %0a%3c [@%0a%3c $ doas pkg_add ngircd%0a%3c $ doas cp /usr/local/share/examples/ngircd/sample-ngircd.conf /etc/ngircd/ngircd.conf%0a%3c @]%0a%3c %0a%3c ngIRCd v26 provided by OpenBSD 6.8 ports does not have ident support. You must eventually compile from source to get ident support, which is necessary on a production server.%0a%3c %0a%3c !!! From source%0a%3c %0a%3c [@%0a%3c $ ftp https://ircnow.org/software/ngircd.tgz%0a%3c $ tar xvzf ngircd.tgz%0a%3c $ cd ngircd-26.1/%0a%3c $ sh build.sh%0a%3c @]%0a%3c %0a%3c !! Configuration%0a%3c %0a%3c Edit /etc/ngircd/ngircd.conf:%0a%3c %0a%3c '''Note''': Lines that begin with # or ; are comments and will be ignored. Remove # or ; to uncomment the line.%0a%3c %0a%3c !!! Global Block%0a%3c %0a%3c [@%0a%3c [Global]%0a%3c Name = username.fruit.ircnow.org%0a%3c AdminInfo1 = Fruit Server on IRCNow%0a%3c AdminInfo2 = Planet Earth%0a%3c AdminEMail = admin@username.fruit.ircnow.org%0a%3c Info = username.fruit.ircnow.org%0a%3c @]%0a%3c %0a%3c For Name, use your hostname (like username.fruit.ircnow.org). If you are on a team, use irc.example.com, replacing example.com with your team's custom domain. For AdminInfo1, provide a description; for AdminInfo2, provide the location.%0a%3c %0a%3c [@%0a%3c Listen = 127.0.0.1,192.168.1.1,2001:db8::%0a%3c @]%0a%3c %0a%3c Uncomment this line and provide every single IP address we want ngircd to listen on. This includes localhost (127.0.0.1), and our public IPv4 and IPv6 addresses. If you are hosting a public service and not on training, avoid listing IPs that are not DDoS-filtered. IRC servers are heavily DDoSed and using an unfiltered IP will get you nullrouted.%0a%3c %0a%3c '''Note''': if you do not uncomment on this line, you will listen to all IPs by default, which is probably a mistake.%0a%3c %0a%3c [@%0a%3c MotdFile = /etc/ngircd/ngircd.motd%0a%3c Network = IRCNow%0a%3c @]%0a%3c %0a%3c Paste your Message of the Day in /etc/ngircd/ngircd.motd. Here's a suggested template:%0a%3c %0a%3c [@%0a%3c IRCNow - The Users' Network%0a%3c %0a%3c IRCNow is the network of the user, by the user, for the user.%0a%3c %0a%3c * No porn / illegal drugs / promotion of violence%0a%3c * No slander / libel / gambling%0a%3c * No spam, illegal cracking, or DDoS%0a%3c * No copyright infrigement%0a%3c %0a%3c You must agree to our terms of service and our privacy policy %0a%3c to use this network:%0a%3c %0a%3c https://wiki.ircnow.org/index.php?n=Terms.Terms%0a%3c %0a%3c Only 5 connections per IP address. If you need help, please speak with staff on #help.%0a%3c @]%0a%3c %0a%3c [@%0a%3c Ports = 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669, 7000, 16667%0a%3c MaxConnectionsIP = 0%0a%3c MaxJoins = 300%0a%3c MaxNickLength = 16%0a%3c MaxListSize = 1000%0a%3c PingTimeout = 300%0a%3c PongTimeout = 300%0a%3c @]%0a%3c %0a%3c The above are default plaintext ports we listen on; we provide ports besides the standard 6667 to allow users to evade their network firewalls. Note that the MaxNickLength must be identical to all servers on the network. On IRCNow, MaxNickLength is 16.%0a%3c %0a%3c !!! Options Block%0a%3c %0a%3c [@%0a%3c [Options]%0a%3c AllowRemoteOper = no%0a%3c ChrootDir = /var/ngircd%0a%3c CloakHost = %25x%0a%3c CloakHostModeX = jrmu.coconut.ircnow.org%0a%3c CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a%3c DefaultUserModes = iC%0a%3c NoticeBeforeRegistration = yes%0a%3c OperChanPAutoOp = no %0a%3c RequireAuthPing = yes%0a%3c SyslogFacility = daemon%0a%3c @]%0a%3c %0a%3c For security reasons, we do not want to allow remote opers. Each team appoints their own opers, so you may not necessarily trust an oper on another server. We want to chroot to /var/ngircd to prevent a security compromise. We will cloak the host using a unique salt; contact another sysadmin for the exact salt.%0a%3c %0a%3c UserMode i keeps the user invisible, and C means that only users that share channels can send a message. Both settings help reduce spam, stalking, and harassment. Receiving a notice before registration can help with debugging with [[openbsd/netcat|netcat]]. We're going to log using syslog (see section below).%0a%3c %0a%3c !!! Configuring syslog%0a%3c %0a%3c You want all the messages from ngircd to go to /var/log/ngircd.log and not anywhere else, so we insert these three lines starting at line 3 (at the top) in /etc/syslog.conf:%0a%3c %0a%3c [@%0a%3c !!ngircd%0a%3c *.* /var/log/ngircd.log%0a%3c !*%0a%3c @]%0a%3c %0a%3c This directs all logs from ngircd to go straight to /var/log/ngircd.log and nowhere else.%0a%3c %0a%3c Next, create the file /var/log/ngircd.log and restart syslogd:%0a%3c %0a%3c [@%0a%3c $ doas touch /var/log/ngircd.log%0a%3c $ doas rcctl restart syslogd%0a%3c @]%0a%3c %0a%3c !!! Operator Block%0a%3c %0a%3c [@%0a%3c [Operator]%0a%3c Name = username%0a%3c Password = password%0a%3c @]%0a%3c %0a%3c Please use a [[password/management|long, random string]] for your password.%0a%3c %0a%3c If you uncomment Mask, your hostmask must match the operator hostmask in order for the /OPER command to be accepted. If it differs at all, then your /OPER command will be rejected. If you don't want to check the hostmask, leave Mask commented out.%0a%3c %0a%3c For more security, you can uncomment Mask and have it match your vhost. However, please be aware that this will make it impossible to authenticate if you ever have to connect from a different IP address.%0a%3c %0a%3c !! Chroot%0a%3c %0a%3c We need to set up the [[openbsd/chroot|chroot]] for ngircd. Let's copy the files into the chroot:%0a%3c %0a%3c [@%0a%3c $ doas mkdir /var/ngircd/etc/%0a%3c $ doas cp -R /etc/ngircd /var/ngircd/etc/%0a%3c $ doas chown -R _ngircd:_ngircd /var/ngircd/%0a%3c $ doas rm -r /etc/ngircd%0a%3c $ doas ln -s /var/ngircd/etc/ngircd /etc/ngircd%0a%3c @]%0a%3c %0a%3c This will create a symlink so that only one set of configuration files needs to be maintained inside and outside of the chroot. Otherwise, ngircd will require two sets of configuration files, one inside and the other outside of the chroot.%0a%3c %0a%3c !! Starting ngircd%0a%3c %0a%3c To start ngircd:%0a%3c %0a%3c [@%0a%3c doas rcctl enable ngircd%0a%3c doas rcctl start ngircd%0a%3c @]%0a%3c %0a%3c [[rcctl/rcctl|rcctl]] controls how system daemons are run.%0a%3c %0a%3c Next, use your IRC client to connect to the server, which may have the hostname user.fruit.ircnow.org. Join a few channels and chat inside.%0a%3c %0a%3c !! Troubleshooting%0a%3c %0a%3c If you run into any errors, you can test to see if your configuration file has errors:%0a%3c %0a%3c [@%0a%3c $ doas ngircd -t%0a%3c @]%0a%3c %0a%3c To run ngircd in debug mode:%0a%3c %0a%3c [@%0a%3c $ doas ngircd -n%0a%3c @]%0a%3c %0a%3c Check /var/log/ngircd.log to see if ngircd is listening on the correct IP addresses and ports. Connect to those ports using your IRC client to verify that the server is working as intended.%0a%3c %0a%3c Remember, if you are connecting using port 6667 without SSL, any eavesdropper can read all your text, including your passwords. Don't send any sensitive information until you have upgraded to [[ngircd/ssl|SSL]].%0a%3c %0a%3c !! Reloading and Restarting ngIRCd%0a%3c %0a%3c After you edit /etc/ngircd/ngircd.conf for a running ngircd server, you will need to reload the configuration file:%0a%3c %0a%3c [@%0a%3c $ doas rcctl reload ngircd%0a%3c @]%0a%3c %0a%3c Alternatively, you can run:%0a%3c %0a%3c [@%0a%3c $ doas pkill -HUP ngircd%0a%3c @]%0a%3c %0a%3c '''Reloading''' a configuration file will '''not''' disconnect any active connections. So, try to reload the configuration where possible.%0a%3c %0a%3c To restart the ircd:%0a%3c %0a%3c [@%0a%3c $ doas rcctl restart ngircd%0a%3c @]%0a%3c %0a%3c '''WARNING''': '''Restarting''' the ircd '''will''' disconnect all existing connections. So, try to restart ngircd only when absolutely necessary.%0a%3c %0a%3c '''Warning''': ngircd appears to have a bug where the ircd will crash if you reload the configuration file while a message is being sent. Be careful to avoid reloading configuration files when many users are chatting.%0a%3c %0a%3c !! See Also%0a%3c %0a%3c # Configure [[ngircd/ssl|SSL]] for ngircd to ensure secure connections%0a%3c # [[ngircd/link|Link your ngircd]] with another server to create a network%0a%3c # Install [[anope/install|anope]] to provide services%0a%3c # Install [[achurch/install|achurch]] to test achurch services%0a%3c # Configure [[hopm/install|hopm]], an open proxy monitor to stop spammers.%0a%3c # Configure [[acopm/install|acopm]], a minimalist open proxy monitor to stop spammers.%0a\ No newline at end of file%0a