Blame
Date:
Wed Feb 1 05:00:29 2023 UTC
Message:
Daily backup
001
2023-01-22
jrmu
version=pmwiki-2.2.130 ordered=1 urlencoded=1
002
2023-01-22
jrmu
agent=Mozilla/5.0 (Windows NT 10.0; rv:105.0) Gecko/20100101 Firefox/105.0
003
2023-01-22
jrmu
author=fossdev
004
2023-01-22
jrmu
charset=UTF-8
005
2023-01-22
jrmu
csum=Edit
006
2023-01-22
jrmu
ctime=1612974683
007
2023-01-22
jrmu
host=2405:201:a40c:a132:4223:43ff:fec0:1a01
008
2023-01-22
jrmu
name=Ngircd.Install
009
2023-01-22
jrmu
rev=121
010
2023-01-22
jrmu
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
jrmu
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
012
2023-01-22
jrmu
time=1667565713
013
2023-01-22
jrmu
title=Ngircd Install Guide
014
2023-01-22
jrmu
author:1667565713=fossdev
015
2023-01-22
jrmu
csum:1667565713=Edit
016
2023-01-22
jrmu
diff:1667565713:1659546979:=
017
2023-01-22
jrmu
host:1667565713=2405:201:a40c:a132:4223:43ff:fec0:1a01
018
2023-01-22
jrmu
author:1659546979=mkf
019
2023-01-22
jrmu
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
020
2023-01-22
jrmu
host:1659546979=2.178.202.141
021
2023-01-22
jrmu
author:1659053857=tiramisu
022
2023-01-22
jrmu
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
023
2023-01-22
jrmu
host:1659053857=2607:fb90:b949:326f:fee6:ed30:3814:d501
024
2023-01-22
jrmu
author:1656939139=baytuch
025
2023-01-22
jrmu
diff:1656939139:1649316468:=295c295%0a%3c rcctl -d restart $SERVICE_NAME%0a---%0a> rcctl -d start $SERVICE_NAME%0a
026
2023-01-22
jrmu
host:1656939139=2001:bc8:1830:1533::2
027
2023-01-22
jrmu
author:1649316468=jrmu
028
2023-01-22
jrmu
diff:1649316468:1649315205:=312a313,314%0a> %0a> Make sure to configure [[hopm/install|hopm]].%0a
029
2023-01-22
jrmu
host:1649316468=38.87.162.154
030
2023-01-22
jrmu
author:1649315205=jrmu
031
2023-01-22
jrmu
diff:1649315205:1649314785:=375a376%0a> # Install [[achurch/install|achurch]] to test achurch services%0a
032
2023-01-22
jrmu
host:1649315205=38.87.162.154
033
2023-01-22
jrmu
author:1649314785=jrmu
034
2023-01-22
jrmu
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
035
2023-01-22
jrmu
host:1649314785=38.87.162.154
036
2023-01-22
jrmu
author:1648181477=jrmu
037
2023-01-22
jrmu
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
038
2023-01-22
jrmu
host:1648181477=38.87.162.154
039
2023-01-22
jrmu
author:1648181362=jrmu
040
2023-01-22
jrmu
diff:1648181362:1648180006:=235c235%0a%3c !! Configuring [[syslogd/configure|syslog]]%0a---%0a> !! Configuring syslog%0a
041
2023-01-22
jrmu
host:1648181362=38.87.162.154
042
2023-01-22
jrmu
author:1648180006=jrmu
043
2023-01-22
jrmu
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
044
2023-01-22
jrmu
host:1648180006=38.87.162.154
045
2023-01-22
jrmu
author:1648141852=jrmu
046
2023-01-22
jrmu
diff:1648141852:1648141818:=
047
2023-01-22
jrmu
host:1648141852=38.87.162.154
048
2023-01-22
jrmu
author:1648141818=jrmu
049
2023-01-22
jrmu
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
050
2023-01-22
jrmu
host:1648141818=38.87.162.154
051
2023-01-22
jrmu
author:1648141334=jrmu
052
2023-01-22
jrmu
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
053
2023-01-22
jrmu
host:1648141334=38.87.162.154
054
2023-01-22
jrmu
author:1648141026=jrmu
055
2023-01-22
jrmu
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
056
2023-01-22
jrmu
host:1648141026=38.87.162.154
057
2023-01-22
jrmu
author:1648140259=jrmu
058
2023-01-22
jrmu
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
059
2023-01-22
jrmu
host:1648140259=38.87.162.154
060
2023-01-22
jrmu
author:1648139583=jrmu
061
2023-01-22
jrmu
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
062
2023-01-22
jrmu
host:1648139583=38.87.162.154
063
2023-01-22
jrmu
author:1648138974=jrmu
064
2023-01-22
jrmu
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
065
2023-01-22
jrmu
host:1648138974=38.87.162.154
066
2023-01-22
jrmu
author:1648138103=jrmu
067
2023-01-22
jrmu
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
068
2023-01-22
jrmu
host:1648138103=38.87.162.154
069
2023-01-22
jrmu
author:1648137933=jrmu
070
2023-01-22
jrmu
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
071
2023-01-22
jrmu
host:1648137933=38.87.162.154
072
2023-01-22
jrmu
author:1648137542=jrmu
073
2023-01-22
jrmu
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
074
2023-01-22
jrmu
host:1648137542=38.87.162.154
075
2023-01-22
jrmu
author:1644786667=jrmu
076
2023-01-22
jrmu
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
077
2023-01-22
jrmu
host:1644786667=38.87.162.154
078
2023-01-22
jrmu
author:1644786645=jrmu
079
2023-01-22
jrmu
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
080
2023-01-22
jrmu
host:1644786645=38.87.162.154
081
2023-01-22
jrmu
author:1644786622=jrmu
082
2023-01-22
jrmu
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
083
2023-01-22
jrmu
host:1644786622=38.87.162.154
084
2023-01-22
jrmu
author:1644786528=jrmu
085
2023-01-22
jrmu
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
086
2023-01-22
jrmu
host:1644786528=38.87.162.154
087
2023-01-22
jrmu
author:1644785351=jrmu
088
2023-01-22
jrmu
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
089
2023-01-22
jrmu
host:1644785351=38.87.162.154
090
2023-01-22
jrmu
author:1642657833=jrmu
091
2023-01-22
jrmu
diff:1642657833:1639821547:=105c105%0a%3c MaxListSize = 3000%0a---%0a> MaxListSize = 1000%0a
092
2023-01-22
jrmu
host:1642657833=38.87.162.8
093
2023-01-22
jrmu
author:1639821547=jrmu
094
2023-01-22
jrmu
diff:1639821547:1639821534:=122c122%0a%3c ;DNS = no%0a---%0a> ;DNS = yes%0a
095
2023-01-22
jrmu
host:1639821547=38.87.162.8
096
2023-01-22
jrmu
author:1639821534=jrmu
097
2023-01-22
jrmu
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
098
2023-01-22
jrmu
host:1639821534=38.87.162.8
099
2023-01-22
jrmu
author:1639817882=jrmu
100
2023-01-22
jrmu
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
101
2023-01-22
jrmu
host:1639817882=38.87.162.47
102
2023-01-22
jrmu
author:1639817723=jrmu
103
2023-01-22
jrmu
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
104
2023-01-22
jrmu
host:1639817723=38.87.162.47
105
2023-01-22
jrmu
author:1638884657=jrmu
106
2023-01-22
jrmu
diff:1638884657:1638845897:=118d117%0a%3c CloakHost = %25x%0a
107
2023-01-22
jrmu
host:1638884657=38.87.162.47
108
2023-01-22
jrmu
author:1638845897=jrmu
109
2023-01-22
jrmu
diff:1638845897:1638840723:=117a118%0a> CloakHost = %25x%0a
110
2023-01-22
jrmu
host:1638845897=38.87.162.8
111
2023-01-22
jrmu
author:1638840723=jrmu
112
2023-01-22
jrmu
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
113
2023-01-22
jrmu
host:1638840723=38.87.162.8
114
2023-01-22
jrmu
author:1637366855=bugzbunny
115
2023-01-22
jrmu
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
116
2023-01-22
jrmu
host:1637366855=72.78.238.236
117
2023-01-22
jrmu
author:1636462605=jrmu
118
2023-01-22
jrmu
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
119
2023-01-22
jrmu
host:1636462605=38.87.162.8
120
2023-01-22
jrmu
author:1635167345=jrmu
121
2023-01-22
jrmu
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
122
2023-01-22
jrmu
host:1635167345=38.87.162.8
123
2023-01-22
jrmu
author:1633228664=jrmu
124
2023-01-22
jrmu
diff:1633228664:1631975364:=116c116%0a%3c CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a---%0a> CloakHostSalt = %3cabcdefghijklmnopqrstuvwxyz>%0a
125
2023-01-22
jrmu
host:1633228664=125.231.16.47
126
2023-01-22
jrmu
author:1631975364=jrmu
127
2023-01-22
jrmu
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
128
2023-01-22
jrmu
host:1631975364=38.87.162.8
129
2023-01-22
jrmu
author:1631964903=jrmu
130
2023-01-22
jrmu
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
131
2023-01-22
jrmu
host:1631964903=38.87.162.8
132
2023-01-22
jrmu
author:1631956282=jrmu
133
2023-01-22
jrmu
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
134
2023-01-22
jrmu
host:1631956282=38.87.162.8
135
2023-01-22
jrmu
author:1631956227=jrmu
136
2023-01-22
jrmu
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
137
2023-01-22
jrmu
host:1631956227=38.87.162.8
138
2023-01-22
jrmu
author:1631955807=jrmu
139
2023-01-22
jrmu
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
140
2023-01-22
jrmu
host:1631955807=38.87.162.8
141
2023-01-22
jrmu
author:1631253991=mkf
142
2023-01-22
jrmu
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
143
2023-01-22
jrmu
host:1631253991=2.178.154.172
144
2023-01-22
jrmu
author:1630332626=jrmu
145
2023-01-22
jrmu
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
146
2023-01-22
jrmu
host:1630332626=125.231.32.127
147
2023-01-22
jrmu
author:1627916713=mkf
148
2023-01-22
jrmu
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
149
2023-01-22
jrmu
host:1627916713=198.251.81.133
150
2023-01-22
jrmu
author:1626787596=mistera
151
2023-01-22
jrmu
diff:1626787596:1625883365:=11c11%0a%3c !!Overview%0a---%0a> !!Theory%0a
152
2023-01-22
jrmu
host:1626787596=204.111.39.57
153
2023-01-22
jrmu
author:1625883365=mistera
154
2023-01-22
jrmu
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
155
2023-01-22
jrmu
host:1625883365=204.111.39.57
156
2023-01-22
jrmu
author:1625881706=mistera
157
2023-01-22
jrmu
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
158
2023-01-22
jrmu
host:1625881706=204.111.39.57
159
2023-01-22
jrmu
author:1625880174=mistera
160
2023-01-22
jrmu
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
161
2023-01-22
jrmu
host:1625880174=204.111.39.57
162
2023-01-22
jrmu
author:1625878603=mistera
163
2023-01-22
jrmu
diff:1625878603:1625878567:=205d204%0a%3c %0a
164
2023-01-22
jrmu
host:1625878603=204.111.39.57
165
2023-01-22
jrmu
author:1625878567=mistera
166
2023-01-22
jrmu
diff:1625878567:1625878195:=194,195d193%0a%3c %0a%3c You may have as many Operator Blocks as you like, one for each Operator.%0a
167
2023-01-22
jrmu
host:1625878567=204.111.39.57
168
2023-01-22
jrmu
author:1625878195=mistera
169
2023-01-22
jrmu
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
170
2023-01-22
jrmu
host:1625878195=204.111.39.57
171
2023-01-22
jrmu
author:1625878071=mistera
172
2023-01-22
jrmu
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
173
2023-01-22
jrmu
host:1625878071=204.111.39.57
174
2023-01-22
jrmu
author:1625877684=mistera
175
2023-01-22
jrmu
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
176
2023-01-22
jrmu
host:1625877684=204.111.39.57
177
2023-01-22
jrmu
author:1625877095=mistera
178
2023-01-22
jrmu
diff:1625877095:1625877023:=147d146%0a%3c [Limits]%0a
179
2023-01-22
jrmu
host:1625877095=204.111.39.57
180
2023-01-22
jrmu
author:1625877023=mistera
181
2023-01-22
jrmu
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
182
2023-01-22
jrmu
host:1625877023=204.111.39.57
183
2023-01-22
jrmu
author:1625869975=mistera
184
2023-01-22
jrmu
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
185
2023-01-22
jrmu
host:1625869975=204.111.39.57
186
2023-01-22
jrmu
author:1625867210=mistera
187
2023-01-22
jrmu
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
188
2023-01-22
jrmu
host:1625867210=204.111.39.57
189
2023-01-22
jrmu
author:1625867173=mistera
190
2023-01-22
jrmu
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
191
2023-01-22
jrmu
host:1625867173=204.111.39.57
192
2023-01-22
jrmu
author:1625867124=mistera
193
2023-01-22
jrmu
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
194
2023-01-22
jrmu
host:1625867124=204.111.39.57
195
2023-01-22
jrmu
author:1625867095=mistera
196
2023-01-22
jrmu
diff:1625867095:1625867078:=294d293%0a%3c %0a
197
2023-01-22
jrmu
host:1625867095=204.111.39.57
198
2023-01-22
jrmu
author:1625867078=mistera
199
2023-01-22
jrmu
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
200
2023-01-22
jrmu
host:1625867078=204.111.39.57
201
2023-01-22
jrmu
author:1625867029=mistera
202
2023-01-22
jrmu
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
203
2023-01-22
jrmu
host:1625867029=204.111.39.57
204
2023-01-22
jrmu
author:1625866998=mistera
205
2023-01-22
jrmu
diff:1625866998:1625866962:=275d274%0a%3c %0a
206
2023-01-22
jrmu
host:1625866998=204.111.39.57
207
2023-01-22
jrmu
author:1625866962=mistera
208
2023-01-22
jrmu
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
209
2023-01-22
jrmu
host:1625866962=204.111.39.57
210
2023-01-22
jrmu
author:1625866954=mistera
211
2023-01-22
jrmu
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
212
2023-01-22
jrmu
host:1625866954=204.111.39.57
213
2023-01-22
jrmu
author:1625866895=mistera
214
2023-01-22
jrmu
diff:1625866895:1625866831:=260d259%0a%3c %0a
215
2023-01-22
jrmu
host:1625866895=204.111.39.57
216
2023-01-22
jrmu
author:1625866831=mistera
217
2023-01-22
jrmu
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
218
2023-01-22
jrmu
host:1625866831=204.111.39.57
219
2023-01-22
jrmu
author:1625866757=mistera
220
2023-01-22
jrmu
diff:1625866757:1625866748:=223d222%0a%3c %0a
221
2023-01-22
jrmu
host:1625866757=204.111.39.57
222
2023-01-22
jrmu
author:1625866748=mistera
223
2023-01-22
jrmu
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
224
2023-01-22
jrmu
host:1625866748=204.111.39.57
225
2023-01-22
jrmu
author:1625866700=mistera
226
2023-01-22
jrmu
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
227
2023-01-22
jrmu
host:1625866700=204.111.39.57
228
2023-01-22
jrmu
author:1625866675=mistera
229
2023-01-22
jrmu
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
230
2023-01-22
jrmu
host:1625866675=204.111.39.57
231
2023-01-22
jrmu
author:1625866591=mistera
232
2023-01-22
jrmu
diff:1625866591:1625866542:=195,196d194%0a%3c %0a%3c You are finished editing ngircd.conf%0a
233
2023-01-22
jrmu
host:1625866591=204.111.39.57
234
2023-01-22
jrmu
author:1625866542=mistera
235
2023-01-22
jrmu
diff:1625866542:1625866371:=196c196%0a%3c !!MOTD file%0a---%0a> !!!MOTD file%0a
236
2023-01-22
jrmu
host:1625866542=204.111.39.57
237
2023-01-22
jrmu
author:1625866371=mistera
238
2023-01-22
jrmu
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
239
2023-01-22
jrmu
host:1625866371=204.111.39.57
240
2023-01-22
jrmu
author:1625866117=mistera
241
2023-01-22
jrmu
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
242
2023-01-22
jrmu
host:1625866117=204.111.39.57
243
2023-01-22
jrmu
author:1625866092=mistera
244
2023-01-22
jrmu
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
245
2023-01-22
jrmu
host:1625866092=204.111.39.57
246
2023-01-22
jrmu
author:1625866084=mistera
247
2023-01-22
jrmu
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
248
2023-01-22
jrmu
host:1625866084=204.111.39.57
249
2023-01-22
jrmu
author:1625866032=mistera
250
2023-01-22
jrmu
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
251
2023-01-22
jrmu
host:1625866032=204.111.39.57
252
2023-01-22
jrmu
author:1625233534=mistera
253
2023-01-22
jrmu
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
254
2023-01-22
jrmu
host:1625233534=204.111.39.57
255
2023-01-22
jrmu
author:1625231673=mistera
256
2023-01-22
jrmu
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
257
2023-01-22
jrmu
host:1625231673=204.111.39.57
258
2023-01-22
jrmu
author:1625230726=mistera
259
2023-01-22
jrmu
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
260
2023-01-22
jrmu
host:1625230726=204.111.39.57
261
2023-01-22
jrmu
author:1625230483=mistera
262
2023-01-22
jrmu
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
263
2023-01-22
jrmu
host:1625230483=204.111.39.57
264
2023-01-22
jrmu
author:1625060991=mistera
265
2023-01-22
jrmu
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
266
2023-01-22
jrmu
host:1625060991=204.111.39.57
267
2023-01-22
jrmu
author:1625060312=mistera
268
2023-01-22
jrmu
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
269
2023-01-22
jrmu
host:1625060312=204.111.39.57
270
2023-01-22
jrmu
author:1625060136=mistera
271
2023-01-22
jrmu
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
272
2023-01-22
jrmu
host:1625060136=204.111.39.57
273
2023-01-22
jrmu
author:1625060108=mistera
274
2023-01-22
jrmu
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
275
2023-01-22
jrmu
host:1625060108=204.111.39.57
276
2023-01-22
jrmu
author:1625059326=mistera
277
2023-01-22
jrmu
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
278
2023-01-22
jrmu
host:1625059326=204.111.39.57
279
2023-01-22
jrmu
author:1625056854=mistera
280
2023-01-22
jrmu
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
281
2023-01-22
jrmu
host:1625056854=204.111.39.57
282
2023-01-22
jrmu
author:1625056833=mistera
283
2023-01-22
jrmu
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
284
2023-01-22
jrmu
host:1625056833=204.111.39.57
285
2023-01-22
jrmu
author:1625055431=mistera
286
2023-01-22
jrmu
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
287
2023-01-22
jrmu
host:1625055431=204.111.39.57
288
2023-01-22
jrmu
author:1625055293=mistera
289
2023-01-22
jrmu
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
290
2023-01-22
jrmu
host:1625055293=204.111.39.57
291
2023-01-22
jrmu
author:1625054364=mistera
292
2023-01-22
jrmu
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
293
2023-01-22
jrmu
host:1625054364=204.111.39.57
294
2023-01-22
jrmu
author:1625054290=mistera
295
2023-01-22
jrmu
diff:1625054290:1625054230:=193c193%0a%3c CloakHostSalt = %3cabcdefghijklmnopqrstuvwxyz>%0a---%0a> CloakHostSalt = abcdefghijklmnopqrstuvwxyz%0a
296
2023-01-22
jrmu
host:1625054290=204.111.39.57
297
2023-01-22
jrmu
author:1625054230=mistera
298
2023-01-22
jrmu
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
299
2023-01-22
jrmu
host:1625054230=204.111.39.57
300
2023-01-22
jrmu
author:1625054213=mistera
301
2023-01-22
jrmu
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
302
2023-01-22
jrmu
host:1625054213=204.111.39.57
303
2023-01-22
jrmu
author:1625053351=mistera
304
2023-01-22
jrmu
diff:1625053351:1625053318:=169d168%0a%3c %0a183d181%0a%3c %0a
305
2023-01-22
jrmu
host:1625053351=204.111.39.57
306
2023-01-22
jrmu
author:1625053318=mistera
307
2023-01-22
jrmu
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
308
2023-01-22
jrmu
host:1625053318=204.111.39.57
309
2023-01-22
jrmu
author:1625053282=mistera
310
2023-01-22
jrmu
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
311
2023-01-22
jrmu
host:1625053282=204.111.39.57
312
2023-01-22
jrmu
author:1625053102=mistera
313
2023-01-22
jrmu
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
314
2023-01-22
jrmu
host:1625053102=204.111.39.57
315
2023-01-22
jrmu
author:1625052936=mistera
316
2023-01-22
jrmu
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
317
2023-01-22
jrmu
host:1625052936=204.111.39.57
318
2023-01-22
jrmu
author:1625052913=mistera
319
2023-01-22
jrmu
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
320
2023-01-22
jrmu
host:1625052913=204.111.39.57
321
2023-01-22
jrmu
author:1625052885=mistera
322
2023-01-22
jrmu
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
323
2023-01-22
jrmu
host:1625052885=204.111.39.57
324
2023-01-22
jrmu
author:1625052855=mistera
325
2023-01-22
jrmu
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
326
2023-01-22
jrmu
host:1625052855=204.111.39.57
327
2023-01-22
jrmu
author:1625052777=mistera
328
2023-01-22
jrmu
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
329
2023-01-22
jrmu
host:1625052777=204.111.39.57
330
2023-01-22
jrmu
author:1625052767=mistera
331
2023-01-22
jrmu
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
332
2023-01-22
jrmu
host:1625052767=204.111.39.57
333
2023-01-22
jrmu
author:1625052738=mistera
334
2023-01-22
jrmu
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
335
2023-01-22
jrmu
host:1625052738=204.111.39.57
336
2023-01-22
jrmu
author:1625052728=mistera
337
2023-01-22
jrmu
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
338
2023-01-22
jrmu
host:1625052728=204.111.39.57
339
2023-01-22
jrmu
author:1625052654=mistera
340
2023-01-22
jrmu
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
341
2023-01-22
jrmu
host:1625052654=204.111.39.57
342
2023-01-22
jrmu
author:1625052551=mistera
343
2023-01-22
jrmu
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
344
2023-01-22
jrmu
host:1625052551=204.111.39.57
345
2023-01-22
jrmu
author:1625052534=mistera
346
2023-01-22
jrmu
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
347
2023-01-22
jrmu
host:1625052534=204.111.39.57
348
2023-01-22
jrmu
author:1625052505=mistera
349
2023-01-22
jrmu
diff:1625052505:1625052489:=116c116%0a%3c -->to use vi, for example:%0a---%0a> ->to use vi, for example:%0a
350
2023-01-22
jrmu
host:1625052505=204.111.39.57
351
2023-01-22
jrmu
author:1625052489=mistera
352
2023-01-22
jrmu
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
353
2023-01-22
jrmu
host:1625052489=204.111.39.57
354
2023-01-22
jrmu
author:1625052381=mistera
355
2023-01-22
jrmu
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
356
2023-01-22
jrmu
host:1625052381=204.111.39.57
357
2023-01-22
jrmu
author:1625052351=mistera
358
2023-01-22
jrmu
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
359
2023-01-22
jrmu
host:1625052351=204.111.39.57
360
2023-01-22
jrmu
author:1625052301=mistera
361
2023-01-22
jrmu
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
362
2023-01-22
jrmu
host:1625052301=204.111.39.57
363
2023-01-22
jrmu
author:1624972917=mistera
364
2023-01-22
jrmu
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
365
2023-01-22
jrmu
host:1624972917=204.111.39.57
366
2023-01-22
jrmu
author:1624968302=mistera
367
2023-01-22
jrmu
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
368
2023-01-22
jrmu
host:1624968302=204.111.39.57
369
2023-01-22
jrmu
author:1620722004=jrmu
370
2023-01-22
jrmu
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
371
2023-01-22
jrmu
host:1620722004=198.251.81.119
372
2023-01-22
jrmu
author:1614857898=jrmu
373
2023-01-22
jrmu
diff:1614857898:1612974683:=108a109%0a> CloakHostModeX = jrmu.coconut.ircnow.org%0a
374
2023-01-22
jrmu
host:1614857898=198.251.81.119
375
2023-01-22
jrmu
author:1612974683=jrmu
376
2023-01-22
jrmu
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
377
2023-01-22
jrmu
host:1612974683=198.251.81.119
IRCNow