Blame
Date:
Sun Oct 2 04:00:24 2022
UTC
Message:
Daily backup
10
2022-04-08
targets=Ngircd.Install,Ngircd.Ssl,Dns.Overview,Ddos.Intro,Password.Management,Hopm.Install
11
2022-04-08
text=(:title Link with another ngIRCd server:)%0a%0a!! Before you begin%0a%0aIn this guide, we assume [[ngircd/install|ngircd]] has been installed and configured to support [[ngircd/ssl|SSL]].%0a%0a!! Updating the Configuration%0a%0aSuppose you have two servers that you want to link together: @@irc.example.com@@ with IP address 192.0.2.1 and @@irc.network.org@@ with IP address 198.51.100.1.%0a%0a'''NOTE''': In your own configuration, you must replace these values with real hostnames and IP addresses.%0a%0aEdit the @@[Server]@@ block in @@/etc/ngircd/ngircd.conf@@ in @@irc.example.com@@:%0a%0a[@%0a[Server]%0a Name = irc.network.org%0a Host = irc.network.org%0a Bind = 192.0.2.1%0a Port = 16697%0a MyPassword = IRCEXAMPLECOMPASSWORD%0a PeerPassword = IRCNETWORKORGPASSWORD%0a Group = 123%0a Passive = yes%0a SSLConnect = yes%0a ;ServiceMask = *Serv,Global%0a@]%0a%0aMake sure the [Server] block is not commented.%0a%0aNotice that for @@irc.example.com@@, the other hostname, @@Host = irc.network.org@@ (the other server) is used. If possible, we recommend using a [[dns/overview|symbolic hostname]] for Host rather than an IP address. That way, if the IP address changes in the future, the conf file does not need to be updated. So, we use @@Host = irc.network.org@@ and not an IP address like @@192.0.2.1@@.%0a%0aBind should be set to the public IP address for @@irc.example.com@@. If you have a [[ddos/intro|DDoS-filtered IP]], you should use it. We recommend using an IPv4 address because IPv6 can be less reliable.%0a%0aMyPassword for @@irc.example.com@@ (this server) must match the PeerPassword for @@irc.network.org@@ (the other server), and PeerPassword for @@irc.example.com@@ must match MyPassword for @@irc.network.org@@.%0a%0aYou must replace @@IRCEXAMPLECOMPASSWORD@@ and @@IRCNETWORKORGPASSWORD@@ with [[password/management|strong passwords]].%0a%0aThese passwords are stored in cleartext (not hashed) so we recommend you generate a new password.%0a%0aPort 16697 with SSL is recommended to keep the connection secure and to avoid having traffic on port 6697, which is normally used by users to connect to the IRCd. Set SSLConnect to yes.%0a%0angIRCd allows server groups. Only one direct link will be formed%0awith servers with the same group ID.%0a%0aOne server should have @@Passive = yes@@, and the other should have @@Passive = no@@. If using a hub and spoke model, a useful convention is for hubs to have @@Passive = yes@@, and leaf nodes @@Passive = no@@.%0a%0aSSL should be used to prevent sensitive information being sent in plaintext.%0a%0aNext, edit @@/etc/ngircd/ngircd.conf@@ in @@irc.network.org@@. If you do not control this server, you will need to ask the other admin to edit it.%0a%0a[Server]%0a Name = irc.example.com%0a Host = irc.example.com%0a Bind = 198.51.100.1%0a Port = 16697%0a MyPassword = IRCNETWORKORGPASSWORD%0a PeerPassword = IRCEXAMPLECOMPASSWORD%0a Group = 123%0a Passive = yes%0a SSLConnect = yes%0a ;ServiceMask = *Serv,Global%0a%0a!! Autostart%0a%0aTo automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/project/ngircd.sh:%0a%0a[@%0adoas touch /usr/local/libexec/project/ngircd.sh%0adoas chmod +x /usr/local/libexec/project/ngircd.sh%0a@]%0a%0aInside /usr/local/libexec/project/ngircd.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 start $SERVICE_NAME%0a fi%0afi%0a@]%0a%0aAdd this as a cronjob:%0a%0a[@%0a$ doas crontab -e%0a%0a* * * * * /usr/local/libexec/project/checker_ngircd.sh > /dev/null 2>&1%0a@]%0a%0aFor the solution to work, you need to enable the use of pid files in /etc/ngircd/ngircd.conf:%0a[@%0aPidFile = /var/run/ngircd/ngircd.pid%0a@]%0a%0aMake sure to configure [[hopm/install|hopm]].%0a
15
2022-04-08
diff:1649314336:1649313761:=31,34c31,32%0a%3c Notice that for @@irc.example.com@@, the other hostname, @@Host = irc.network.org@@ (the other server) is used. If possible, we recommend using a [[dns/overview|symbolic hostname]] for Host rather than an IP address. That way, if the IP address changes in the future, the conf file does not need to be updated. So, we use @@Host = irc.network.org@@ and not an IP address like @@192.0.2.1@@.%0a%3c %0a%3c Bind should be set to the public IP address for @@irc.example.com@@. If you have a [[ddos/intro|DDoS-filtered IP]], you should use it. We recommend using an IPv4 address because IPv6 can be less reliable.%0a%3c %0a---%0a> Notice that for @@irc.example.com@@, the other hostname, @@Host = irc.network.org@@ (the other server) is used. If possible, we recommend using a [[dns/overview|symbolic hostname]] for Host rather than an IP address. That way, if the IP address changes in the future, the conf file does not need to be updated. So, we use @@Host = irc.network.org@@ and not an IP address like 192.0.2.1.%0a> %0a40a39,40%0a> Bind should be set to the public IP address for @@irc.example.com@@. If you have a [[ddos/intro|DDoS-filtered IP]], you should use it. We recommend using an IPv4 address for reliability reasons.%0a> %0a43,48c43%0a%3c ngIRCd allows server groups. Only one direct link will be formed%0a%3c with servers with the same group ID.%0a%3c %0a%3c One server should have @@Passive = yes@@, and the other should have @@Passive = no@@. If using a hub and spoke model, a useful convention is for hubs to have @@Passive = yes@@, and leaf nodes @@Passive = no@@.%0a%3c %0a%3c SSL should be used to prevent sensitive information being sent in plaintext.%0a---%0a> One server should be have Passive = yes, and the other should have Passive = no. If using a hub and spoke model, a useful convention is for hubs to have @@Passive = yes@@, and leaf nodes @@Passive = no@@.%0a
18
2022-04-08
diff:1649313761:1649138978:=44,57d43%0a%3c %0a%3c Next, edit @@/etc/ngircd/ngircd.conf@@ in @@irc.network.org@@. If you do not control this server, you will need to ask the other admin to edit it.%0a%3c %0a%3c [Server]%0a%3c Name = irc.example.com%0a%3c Host = irc.example.com%0a%3c Bind = 198.51.100.1%0a%3c Port = 16697%0a%3c MyPassword = IRCNETWORKORGPASSWORD%0a%3c PeerPassword = IRCEXAMPLECOMPASSWORD%0a%3c Group = 123%0a%3c Passive = yes%0a%3c SSLConnect = yes%0a%3c ;ServiceMask = *Serv,Global%0a
21
2022-04-06
diff:1649138978:1649138878:=85c85%0a%3c Make sure to configure [[hopm/install|hopm]].%0a---%0a> Make sure to configure [[openbsd/hopm|hopm]].%0a
24
2022-04-06
diff:1649138878:1649138232:=9,12c9,10%0a%3c Suppose you have two servers that you want to link together: @@irc.example.com@@ with IP address 192.0.2.1 and @@irc.network.org@@ with IP address 198.51.100.1.%0a%3c %0a%3c '''NOTE''': In your own configuration, you must replace these values with real hostnames and IP addresses.%0a%3c %0a---%0a> Suppose you have two servers that you want to link together: @@irc.example.com@@ with IP address 192.0.2.1 and @@irc.example.org@@ with IP address 198.51.100.1.%0a> %0a17,18c15,16%0a%3c Name = irc.network.org%0a%3c Host = irc.network.org%0a---%0a> Name = irc.example.org%0a> Host = irc.example.org%0a22c20%0a%3c PeerPassword = IRCNETWORKORGPASSWORD%0a---%0a> PeerPassword = IRCEXAMPLEORGPASSWORD%0a31,43c29,35%0a%3c Notice that for @@irc.example.com@@, the other hostname, @@Host = irc.network.org@@ (the other server) is used. If possible, we recommend using a [[dns/overview|symbolic hostname]] for Host rather than an IP address. That way, if the IP address changes in the future, the conf file does not need to be updated. So, we use @@Host = irc.network.org@@ and not an IP address like 192.0.2.1.%0a%3c %0a%3c MyPassword for @@irc.example.com@@ (this server) must match the PeerPassword for @@irc.network.org@@ (the other server), and PeerPassword for @@irc.example.com@@ must match MyPassword for @@irc.network.org@@.%0a%3c %0a%3c You must replace @@IRCEXAMPLECOMPASSWORD@@ and @@IRCNETWORKORGPASSWORD@@ with [[password/management|strong passwords]].%0a%3c %0a%3c These passwords are stored in cleartext (not hashed) so we recommend you generate a new password.%0a%3c %0a%3c Bind should be set to the public IP address for @@irc.example.com@@. If you have a [[ddos/intro|DDoS-filtered IP]], you should use it. We recommend using an IPv4 address for reliability reasons.%0a%3c %0a%3c Port 16697 with SSL is recommended to keep the connection secure and to avoid having traffic on port 6697, which is normally used by users to connect to the IRCd. Set SSLConnect to yes.%0a%3c %0a%3c One server should be have Passive = yes, and the other should have Passive = no. If using a hub and spoke model, a useful convention is for hubs to have @@Passive = yes@@, and leaf nodes @@Passive = no@@.%0a---%0a> Notice that for @@irc.example.com@@, the other hostname, @@Host = irc.example.org@@ (the other server) is used. If possible, we recommend using a [[dns/overview|symbolic hostname]] for Host rather than an IP address. That way, if the IP address changes in the future, the conf file does not need to be updated. So, we use @@Host = irc.example.org@@ and not an IP address like 192.0.2.1.%0a> %0a> MyPassword for @@irc.example.com@@ (this server) must match the PeerPassword for @@irc.example.org@@ (the other server), and PeerPassword for @@irc.example.com@@ must match MyPassword for @@irc.example.org@@.%0a> %0a> You must replace @@IRCEXAMPLECOMPASSWORD@@ and @@IRCEXAMPLEORGPASSWORD@@ with [[password/management|strong passwords]].%0a> %0a> These passwords are stored in cleartext (not hashed) so we recommend you generate a new random password.%0a
27
2022-04-06
diff:1649138232:1649137717:=9,12c9,12%0a%3c Suppose you have two servers that you want to link together: @@irc.example.com@@ with IP address 192.0.2.1 and @@irc.example.org@@ with IP address 198.51.100.1.%0a%3c %0a%3c Edit the @@[Server]@@ block in @@/etc/ngircd/ngircd.conf@@ in @@irc.example.com@@:%0a%3c %0a---%0a> Suppose you have two servers that you want to link together: irc.example.com and irc.example.org.%0a> %0a> Edit the [Server] block in /etc/ngircd/ngircd.conf in irc.example.com:%0a> %0a17c17%0a%3c Bind = 192.0.2.1%0a---%0a> ;Bind = 10.0.0.1%0a21,23c21,23%0a%3c Group = 123%0a%3c Passive = yes%0a%3c SSLConnect = yes%0a---%0a> ;Group = 123%0a> ;Passive = no%0a> ;SSLConnect = yes%0a29,35c29,38%0a%3c Notice that for @@irc.example.com@@, the other hostname, @@Host = irc.example.org@@ (the other server) is used. If possible, we recommend using a [[dns/overview|symbolic hostname]] for Host rather than an IP address. That way, if the IP address changes in the future, the conf file does not need to be updated. So, we use @@Host = irc.example.org@@ and not an IP address like 192.0.2.1.%0a%3c %0a%3c MyPassword for @@irc.example.com@@ (this server) must match the PeerPassword for @@irc.example.org@@ (the other server), and PeerPassword for @@irc.example.com@@ must match MyPassword for @@irc.example.org@@.%0a%3c %0a%3c You must replace @@IRCEXAMPLECOMPASSWORD@@ and @@IRCEXAMPLEORGPASSWORD@@ with [[password/management|strong passwords]].%0a%3c %0a%3c These passwords are stored in cleartext (not hashed) so we recommend you generate a new random password.%0a---%0a> Notice that for @@irc.example.com@@, Host must be @@irc.example.org@@ (the other server).%0a> MyPassword is%0a> %0a> If possible, we recommend using a [[dns/overview|symbolic hostname]] rather than an IP address, in case the IP address changes in the future. Notice that Host = irc.example.com and not an IP address like 192.0.2.1.%0a> %0a> Sysadmins should have proper [[openbsd/passwords|password management]].%0a> %0a> Keep in mind that ''MyPassword'' is used for linking with other servers. **It is stored in plaintext and has nothing to do with the server password specified under [Global] section, nor is it related to your [Operator] password!**. When other servers connects to you, they **need** to know **your** ''MyPassword'', in which they will then set it as their ''PeerPassword'' on their end. The same thing likewise when you need to peer with them, you **need** to know their ''MyPassword'' so that you can set it as **your** ''PeerPassword''.%0a> %0a> See how in the example above how ''irc.foo.org'' ''MyPassword'' is set as ''Jp5meaikMiRAKsbBy6G6'' but when linking with ''irc.bar.org'', whose ''MyPassword'' is set as ''HpNSbcDbrTVQ3lkkqSfq'', that ''irc.foo.org'' ''PeerPassword'' is therefore ''HpNSbcDbrTVQ3lkkqSfq'' for linking to ''irc.bar.org''? The same logic also applies in reverse for when ''irc.bar.org'' is to link up with ''irc.foo.org''%0a
30
2022-04-06
diff:1649137717:1649136524:=15,24c15,19%0a%3c Name = irc.example.org%0a%3c Host = irc.example.org%0a%3c ;Bind = 10.0.0.1%0a%3c Port = 16697%0a%3c MyPassword = IRCEXAMPLECOMPASSWORD%0a%3c PeerPassword = IRCEXAMPLEORGPASSWORD%0a%3c ;Group = 123%0a%3c ;Passive = no%0a%3c ;SSLConnect = yes%0a%3c ;ServiceMask = *Serv,Global%0a---%0a> Name = irc.example.com%0a> Host = irc.example.com%0a> Port = 6667%0a> MyPassword = password12345%0a> PeerPassword = password12345%0a29,31d23%0a%3c Notice that for @@irc.example.com@@, Host must be @@irc.example.org@@ (the other server).%0a%3c MyPassword is%0a%3c %0a34,43c26,27%0a%3c Sysadmins should have proper [[openbsd/passwords|password management]].%0a%3c %0a%3c Keep in mind that ''MyPassword'' is used for linking with other servers. **It is stored in plaintext and has nothing to do with the server password specified under [Global] section, nor is it related to your [Operator] password!**. When other servers connects to you, they **need** to know **your** ''MyPassword'', in which they will then set it as their ''PeerPassword'' on their end. The same thing likewise when you need to peer with them, you **need** to know their ''MyPassword'' so that you can set it as **your** ''PeerPassword''.%0a%3c %0a%3c See how in the example above how ''irc.foo.org'' ''MyPassword'' is set as ''Jp5meaikMiRAKsbBy6G6'' but when linking with ''irc.bar.org'', whose ''MyPassword'' is set as ''HpNSbcDbrTVQ3lkkqSfq'', that ''irc.foo.org'' ''PeerPassword'' is therefore ''HpNSbcDbrTVQ3lkkqSfq'' for linking to ''irc.bar.org''? The same logic also applies in reverse for when ''irc.bar.org'' is to link up with ''irc.foo.org''%0a%3c %0a%3c !! Autostart%0a%3c %0a%3c To automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/project/ngircd.sh:%0a%3c %0a---%0a> === Example ngIRCd server configurations ===%0a> To illustrate what I mean is, say for example, you have two ''ngircd'' servers that you want to connect to each other. Let's say that the server "foo" has this configuration,%0a45,46c29,34%0a%3c doas touch /usr/local/libexec/project/ngircd.sh%0a%3c doas chmod +x /usr/local/libexec/project/ngircd.sh%0a---%0a> [Global]%0a> Name = irc.foo.org%0a> Ports = 6667%0a> ...%0a> [Server]%0a> MyPassword = Jp5meaikMiRAKsbBy6G6%0a49,50c37%0a%3c Inside /usr/local/libexec/project/ngircd.sh:%0a%3c %0a---%0a> Server "bar" has the following configuration,%0a52,64c39,44%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---%0a> [Global]%0a> Name = irc.bar.org%0a> Ports = 6667%0a> ...%0a> [Server]%0a> MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a67,68d46%0a%3c Add this as a cronjob:%0a%3c %0a70,72c48,53%0a%3c $ doas crontab -e%0a%3c %0a%3c * * * * * /usr/local/libexec/project/checker_ngircd.sh > /dev/null 2>&1%0a---%0a> [Server]%0a> Name = irc.bar.org%0a> Host = irc.bar.org%0a> Port = 6667%0a> MyPassword = Jp5meaikMiRAKsbBy6G6%0a> PeerPassword = HpNSbcDbrTVQ3lkkqSfq%0a75c56%0a%3c For the solution to work, you need to enable the use of pid files in /etc/ngircd/ngircd.conf:%0a---%0a> Likewise under server "bar",%0a77c58,63%0a%3c PidFile = /var/run/ngircd/ngircd.pid%0a---%0a> [Server]%0a> Name = irc.foo.org%0a> Host = irc.foo.org%0a> Port = 6667%0a> MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a> PeerPassword = Jp5meaikMiRAKsbBy6G6%0a79a66,132%0a> Sysadmins should have proper [[openbsd/passwords|password management]].%0a> %0a> Keep in mind that ''MyPassword'' is used for linking with other servers. **It is stored in plaintext and has nothing to do with the server password specified under [Global] section, nor is it related to your [Operator] password!**. When other servers connects to you, they **need** to know **your** ''MyPassword'', in which they will then set it as their ''PeerPassword'' on their end. The same thing likewise when you need to peer with them, you **need** to know their ''MyPassword'' so that you can set it as **your** ''PeerPassword''.%0a> %0a> See how in the example above how ''irc.foo.org'' ''MyPassword'' is set as ''Jp5meaikMiRAKsbBy6G6'' but when linking with ''irc.bar.org'', whose ''MyPassword'' is set as ''HpNSbcDbrTVQ3lkkqSfq'', that ''irc.foo.org'' ''PeerPassword'' is therefore ''HpNSbcDbrTVQ3lkkqSfq'' for linking to ''irc.bar.org''? The same logic also applies in reverse for when ''irc.bar.org'' is to link up with ''irc.foo.org''.%0a> %0a> === Summing it up ===%0a> To sum it up in the prior example,%0a> Server ''irc.foo.org'' has the following for ''irc.bar.org'',%0a> [@%0a> [Server]%0a> Name = irc.bar.org%0a> Host = irc.bar.org%0a> Port = 6667%0a> MyPassword = Password_To_Be_Set_On_IRCBARORG's_PeerPassword%0a> PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCBARORG's_MyPassword%0a> @]%0a> and the same likewise, for ''irc.bar.org'' when linking to ''irc.foo.org'',%0a> [@%0a> [Server]%0a> Name = irc.foo.org%0a> Host = irc.foo.org%0a> Port = 6667%0a> MyPassword = Password_To_Be_Set_On_IRCFOOORG's_PeerPassword%0a> PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCFOOORG's_MyPassword%0a> @]%0a> %0a> !! Autostart%0a> %0a> To automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/project/ngircd.sh:%0a> %0a> [@%0a> doas touch /usr/local/libexec/project/ngircd.sh%0a> doas chmod +x /usr/local/libexec/project/ngircd.sh%0a> @]%0a> %0a> Inside /usr/local/libexec/project/ngircd.sh:%0a> %0a> [@%0a> #!/bin/sh%0a> %0a> SERVICE_NAME="ngircd"%0a> SERVICE_USER="_ngircd"%0a> SERVICE_PID="/var/ngircd/var/run/ngircd/ngircd.pid"%0a> %0a> if ! pgrep -u $SERVICE_USER -x "$SERVICE_NAME" > /dev/null%0a> then%0a> if [ -f $SERVICE_PID ]; then%0a> rm -f $SERVICE_PID%0a> rcctl -d start $SERVICE_NAME%0a> fi%0a> fi%0a> @]%0a> %0a> Add this as a cronjob:%0a> %0a> [@%0a> $ doas crontab -e%0a> %0a> * * * * * /usr/local/libexec/project/checker_ngircd.sh > /dev/null 2>&1%0a> @]%0a> %0a> For the solution to work, you need to enable the use of pid files in /etc/ngircd/ngircd.conf:%0a> [@%0a> PidFile = /var/run/ngircd/ngircd.pid%0a> @]%0a> %0a80a134,137%0a> %0a> %0a> %0a> %0a
33
2022-04-06
diff:1649136524:1649136157:=7,12c7,8%0a%3c !! Updating the Configuration%0a%3c %0a%3c Suppose you have two servers that you want to link together: irc.example.com and irc.example.org.%0a%3c %0a%3c Edit the [Server] block in /etc/ngircd/ngircd.conf in irc.example.com:%0a%3c %0a---%0a> In the server block, for Host, it is better to use a [[openbsd/dns|symbolic hostname]] (don't use an IP address).%0a> %0a15,16c11,12%0a%3c Name = irc.example.com%0a%3c Host = irc.example.com%0a---%0a> Name = irc.example.ircnow.org%0a> Host = irc.example.ircnow.org%0a22,27c18,23%0a%3c Make sure the [Server] block is not commented.%0a%3c %0a%3c If possible, we recommend using a [[dns/overview|symbolic hostname]] rather than an IP address, in case the IP address changes in the future. Notice that Host = irc.example.com and not an IP address like 192.0.2.1.%0a%3c %0a%3c === Example ngIRCd server configurations ===%0a%3c To illustrate what I mean is, say for example, you have two ''ngircd'' servers that you want to connect to each other. Let's say that the server "foo" has this configuration,%0a---%0a> Notice that Host = irc.example.ircnow.org and not an IP address like 1.2.3.4. This makes it less work to configure when the other server changes its IP address.%0a> %0a> !! Autostart%0a> %0a> To automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/project/ngircd.sh:%0a> %0a29,34c25,26%0a%3c [Global]%0a%3c Name = irc.foo.org%0a%3c Ports = 6667%0a%3c ...%0a%3c [Server]%0a%3c MyPassword = Jp5meaikMiRAKsbBy6G6%0a---%0a> doas touch /usr/local/libexec/project/ngircd.sh%0a> doas chmod +x /usr/local/libexec/project/ngircd.sh%0a37c29,30%0a%3c Server "bar" has the following configuration,%0a---%0a> Inside /usr/local/libexec/project/ngircd.sh:%0a> %0a39,44c32,44%0a%3c [Global]%0a%3c Name = irc.bar.org%0a%3c Ports = 6667%0a%3c ...%0a%3c [Server]%0a%3c MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a---%0a> #!/bin/sh%0a> %0a> SERVICE_NAME="ngircd"%0a> SERVICE_USER="_ngircd"%0a> SERVICE_PID="/var/ngircd/var/run/ngircd/ngircd.pid"%0a> %0a> if ! pgrep -u $SERVICE_USER -x "$SERVICE_NAME" > /dev/null%0a> then%0a> if [ -f $SERVICE_PID ]; then%0a> rm -f $SERVICE_PID%0a> rcctl -d start $SERVICE_NAME%0a> fi%0a> fi%0a46a47,48%0a> Add this as a cronjob:%0a> %0a48,53c50,52%0a%3c [Server]%0a%3c Name = irc.bar.org%0a%3c Host = irc.bar.org%0a%3c Port = 6667%0a%3c MyPassword = Jp5meaikMiRAKsbBy6G6%0a%3c PeerPassword = HpNSbcDbrTVQ3lkkqSfq%0a---%0a> $ doas crontab -e%0a> %0a> * * * * * /usr/local/libexec/project/checker_ngircd.sh > /dev/null 2>&1%0a56c55%0a%3c Likewise under server "bar",%0a---%0a> For the solution to work, you need to enable the use of pid files in /etc/ngircd/ngircd.conf:%0a58,63c57%0a%3c [Server]%0a%3c Name = irc.foo.org%0a%3c Host = irc.foo.org%0a%3c Port = 6667%0a%3c MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a%3c PeerPassword = Jp5meaikMiRAKsbBy6G6%0a---%0a> PidFile = /var/run/ngircd/ngircd.pid%0a66,74c60,67%0a%3c Sysadmins should have proper [[openbsd/passwords|password management]].%0a%3c %0a%3c Keep in mind that ''MyPassword'' is used for linking with other servers. **It is stored in plaintext and has nothing to do with the server password specified under [Global] section, nor is it related to your [Operator] password!**. When other servers connects to you, they **need** to know **your** ''MyPassword'', in which they will then set it as their ''PeerPassword'' on their end. The same thing likewise when you need to peer with them, you **need** to know their ''MyPassword'' so that you can set it as **your** ''PeerPassword''.%0a%3c %0a%3c See how in the example above how ''irc.foo.org'' ''MyPassword'' is set as ''Jp5meaikMiRAKsbBy6G6'' but when linking with ''irc.bar.org'', whose ''MyPassword'' is set as ''HpNSbcDbrTVQ3lkkqSfq'', that ''irc.foo.org'' ''PeerPassword'' is therefore ''HpNSbcDbrTVQ3lkkqSfq'' for linking to ''irc.bar.org''? The same logic also applies in reverse for when ''irc.bar.org'' is to link up with ''irc.foo.org''.%0a%3c %0a%3c === Summing it up ===%0a%3c To sum it up in the prior example,%0a%3c Server ''irc.foo.org'' has the following for ''irc.bar.org'',%0a---%0a> Make sure to configure [[openbsd/hopm|hopm]].%0a> %0a> %0a> %0a> %0a> %0a> === Example ngIRCd server configurations ===%0a> To illustrate what I mean is, say for example, you have two ''ngircd'' servers that you want to connect to each other. Let's say that the server "foo" has this configuration,%0a75a69,72%0a> [Global]%0a> Name = irc.foo.org%0a> Ports = 6667%0a> ...%0a76a74,79%0a> MyPassword = Jp5meaikMiRAKsbBy6G6%0a> @]%0a> %0a> Server "bar" has the following configuration,%0a> [@%0a> [Global]%0a78,81c81,84%0a%3c Host = irc.bar.org%0a%3c Port = 6667%0a%3c MyPassword = Password_To_Be_Set_On_IRCBARORG's_PeerPassword%0a%3c PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCBARORG's_MyPassword%0a---%0a> Ports = 6667%0a> ...%0a> [Server]%0a> MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a83c86%0a%3c and the same likewise, for ''irc.bar.org'' when linking to ''irc.foo.org'',%0a---%0a> %0a86,87c89,90%0a%3c Name = irc.foo.org%0a%3c Host = irc.foo.org%0a---%0a> Name = irc.bar.org%0a> Host = irc.bar.org%0a89,90c92,93%0a%3c MyPassword = Password_To_Be_Set_On_IRCFOOORG's_PeerPassword%0a%3c PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCFOOORG's_MyPassword%0a---%0a> MyPassword = Jp5meaikMiRAKsbBy6G6%0a> PeerPassword = HpNSbcDbrTVQ3lkkqSfq%0a93,96c96%0a%3c !! Autostart%0a%3c %0a%3c To automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/project/ngircd.sh:%0a%3c %0a---%0a> Likewise under server "bar",%0a98,99c98,103%0a%3c doas touch /usr/local/libexec/project/ngircd.sh%0a%3c doas chmod +x /usr/local/libexec/project/ngircd.sh%0a---%0a> [Server]%0a> Name = irc.foo.org%0a> Host = irc.foo.org%0a> Port = 6667%0a> MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a> PeerPassword = Jp5meaikMiRAKsbBy6G6%0a102,103c106,114%0a%3c Inside /usr/local/libexec/project/ngircd.sh:%0a%3c %0a---%0a> Sysadmins should have proper [[openbsd/passwords|password management]].%0a> %0a> Keep in mind that ''MyPassword'' is used for linking with other servers. **It is stored in plaintext and has nothing to do with the server password specified under [Global] section, nor is it related to your [Operator] password!**. When other servers connects to you, they **need** to know **your** ''MyPassword'', in which they will then set it as their ''PeerPassword'' on their end. The same thing likewise when you need to peer with them, you **need** to know their ''MyPassword'' so that you can set it as **your** ''PeerPassword''.%0a> %0a> See how in the example above how ''irc.foo.org'' ''MyPassword'' is set as ''Jp5meaikMiRAKsbBy6G6'' but when linking with ''irc.bar.org'', whose ''MyPassword'' is set as ''HpNSbcDbrTVQ3lkkqSfq'', that ''irc.foo.org'' ''PeerPassword'' is therefore ''HpNSbcDbrTVQ3lkkqSfq'' for linking to ''irc.bar.org''? The same logic also applies in reverse for when ''irc.bar.org'' is to link up with ''irc.foo.org''.%0a> %0a> === Summing it up ===%0a> To sum it up in the prior example,%0a> Server ''irc.foo.org'' has the following for ''irc.bar.org'',%0a105,117c116,121%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---%0a> [Server]%0a> Name = irc.bar.org%0a> Host = irc.bar.org%0a> Port = 6667%0a> MyPassword = Password_To_Be_Set_On_IRCBARORG's_PeerPassword%0a> PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCBARORG's_MyPassword%0a119,121c123%0a%3c %0a%3c Add this as a cronjob:%0a%3c %0a---%0a> and the same likewise, for ''irc.bar.org'' when linking to ''irc.foo.org'',%0a123,125c125,130%0a%3c $ doas crontab -e%0a%3c %0a%3c * * * * * /usr/local/libexec/project/checker_ngircd.sh > /dev/null 2>&1%0a---%0a> [Server]%0a> Name = irc.foo.org%0a> Host = irc.foo.org%0a> Port = 6667%0a> MyPassword = Password_To_Be_Set_On_IRCFOOORG's_PeerPassword%0a> PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCFOOORG's_MyPassword%0a127,137d131%0a%3c %0a%3c For the solution to work, you need to enable the use of pid files in /etc/ngircd/ngircd.conf:%0a%3c [@%0a%3c PidFile = /var/run/ngircd/ngircd.pid%0a%3c @]%0a%3c %0a%3c Make sure to configure [[openbsd/hopm|hopm]].%0a%3c %0a%3c %0a%3c %0a%3c %0a
36
2022-04-06
diff:1649136157:1642661410:=1,5c1%0a%3c (:title Link with another ngIRCd server:)%0a%3c %0a%3c !! Before you begin%0a%3c %0a%3c In this guide, we assume [[ngircd/install|ngircd]] has been installed and configured to support [[ngircd/ssl|SSL]].%0a---%0a> (:title Link with another server to create a network:)%0a
40
2022-01-21
diff:1642661410:1642660894:=1c1%0a%3c (:title Link with another server to create a network:)%0a---%0a> !!Link with another server to create a network%0a
44
2022-01-21
diff:1642660894:1612973765:=1,2d0%0a%3c !!Link with another server to create a network%0a%3c %0a
47
2021-12-17
diff:1612973765:1612973229:=0a1%0a> %0a55,125d55%0a%3c %0a%3c %0a%3c %0a%3c %0a%3c %0a%3c === Example ngIRCd server configurations ===%0a%3c To illustrate what I mean is, say for example, you have two ''ngircd'' servers that you want to connect to each other. Let's say that the server "foo" has this configuration,%0a%3c [@%0a%3c [Global]%0a%3c Name = irc.foo.org%0a%3c Ports = 6667%0a%3c ...%0a%3c [Server]%0a%3c MyPassword = Jp5meaikMiRAKsbBy6G6%0a%3c @]%0a%3c %0a%3c Server "bar" has the following configuration,%0a%3c [@%0a%3c [Global]%0a%3c Name = irc.bar.org%0a%3c Ports = 6667%0a%3c ...%0a%3c [Server]%0a%3c MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a%3c @]%0a%3c %0a%3c [@%0a%3c [Server]%0a%3c Name = irc.bar.org%0a%3c Host = irc.bar.org%0a%3c Port = 6667%0a%3c MyPassword = Jp5meaikMiRAKsbBy6G6%0a%3c PeerPassword = HpNSbcDbrTVQ3lkkqSfq%0a%3c @]%0a%3c %0a%3c Likewise under server "bar",%0a%3c [@%0a%3c [Server]%0a%3c Name = irc.foo.org%0a%3c Host = irc.foo.org%0a%3c Port = 6667%0a%3c MyPassword = HpNSbcDbrTVQ3lkkqSfq%0a%3c PeerPassword = Jp5meaikMiRAKsbBy6G6%0a%3c @]%0a%3c %0a%3c Sysadmins should have proper [[openbsd/passwords|password management]].%0a%3c %0a%3c Keep in mind that ''MyPassword'' is used for linking with other servers. **It is stored in plaintext and has nothing to do with the server password specified under [Global] section, nor is it related to your [Operator] password!**. When other servers connects to you, they **need** to know **your** ''MyPassword'', in which they will then set it as their ''PeerPassword'' on their end. The same thing likewise when you need to peer with them, you **need** to know their ''MyPassword'' so that you can set it as **your** ''PeerPassword''.%0a%3c %0a%3c See how in the example above how ''irc.foo.org'' ''MyPassword'' is set as ''Jp5meaikMiRAKsbBy6G6'' but when linking with ''irc.bar.org'', whose ''MyPassword'' is set as ''HpNSbcDbrTVQ3lkkqSfq'', that ''irc.foo.org'' ''PeerPassword'' is therefore ''HpNSbcDbrTVQ3lkkqSfq'' for linking to ''irc.bar.org''? The same logic also applies in reverse for when ''irc.bar.org'' is to link up with ''irc.foo.org''.%0a%3c %0a%3c === Summing it up ===%0a%3c To sum it up in the prior example,%0a%3c Server ''irc.foo.org'' has the following for ''irc.bar.org'',%0a%3c [@%0a%3c [Server]%0a%3c Name = irc.bar.org%0a%3c Host = irc.bar.org%0a%3c Port = 6667%0a%3c MyPassword = Password_To_Be_Set_On_IRCBARORG's_PeerPassword%0a%3c PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCBARORG's_MyPassword%0a%3c @]%0a%3c and the same likewise, for ''irc.bar.org'' when linking to ''irc.foo.org'',%0a%3c [@%0a%3c [Server]%0a%3c Name = irc.foo.org%0a%3c Host = irc.foo.org%0a%3c Port = 6667%0a%3c MyPassword = Password_To_Be_Set_On_IRCFOOORG's_PeerPassword%0a%3c PeerPassword = Password_That_Is_To_Be_received_from_owner_of_IRCFOOORG's_MyPassword%0a%3c @]%0a
50
2021-12-17
diff:1612973229:1612973229:=1,55d0%0a%3c %0a%3c In the server block, for Host, it is better to use a [[openbsd/dns|symbolic hostname]] (don't use an IP address).%0a%3c %0a%3c [@%0a%3c [Server]%0a%3c Name = irc.example.ircnow.org%0a%3c Host = irc.example.ircnow.org%0a%3c Port = 6667%0a%3c MyPassword = password12345%0a%3c PeerPassword = password12345%0a%3c @]%0a%3c %0a%3c Notice that Host = irc.example.ircnow.org and not an IP address like 1.2.3.4. This makes it less work to configure when the other server changes its IP address.%0a%3c %0a%3c !! Autostart%0a%3c %0a%3c To automatically restart ngIRCd if it was terminated unexpectedly, create a script in /usr/local/libexec/project/ngircd.sh:%0a%3c %0a%3c [@%0a%3c doas touch /usr/local/libexec/project/ngircd.sh%0a%3c doas chmod +x /usr/local/libexec/project/ngircd.sh%0a%3c @]%0a%3c %0a%3c Inside /usr/local/libexec/project/ngircd.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 * * * * * /usr/local/libexec/project/checker_ngircd.sh > /dev/null 2>&1%0a%3c @]%0a%3c %0a%3c For the solution to work, you need to enable the use of pid files in /etc/ngircd/ngircd.conf:%0a%3c [@%0a%3c PidFile = /var/run/ngircd/ngircd.pid%0a%3c @]%0a%3c %0a%3c Make sure to configure [[openbsd/hopm|hopm]].%0a