Daily Maintenance for ZNC
Every admin should use his team's bouncer to make sure it works. Eat your own dog food. See connection instructions for your IRC client.
Each day, you should check for errors with your znc.
$ doas less /home/znc/home/znc/.znc/moddata/adminlog/znc.log
Scroll to the bottom by typing G.
[2021-01-25 03:12:52] [user/network] disconnected from IRC [2021-01-25 03:15:29] [user/network] disconnected from IRC [2021-01-25 03:19:21] [user/network] disconnected from IRC [2021-01-25 03:23:12] [user/network] disconnected from IRC
If you see these repeating messages "disconnected from IRC", it means that znc is attempting to connect to a network but failing. This is a network error that you must fix.
WARNING: If you do not fix this problem, your ZNC will throttle all of its users, slowing down reconnections for everyone!
G-lined
Use less? to search through znc.log to find error messages like the following:
[2021-01-25 03:55:25] [user1/network] disconnected from IRC: irc.example.com [:Closing link: (user@fruit.ircnow.org) [G-Lined: This connection is not authorized on IRC Network - (ID: VL0GY6RV79)]]
This shows that the network has G-lined fruit.ircnow.org from connecting. Because the vhost is fruit.ircnow.org and not unique (it's not user.fruit.ircnow.org), this address is most likely an IPv4 address that has been glined. You can either write to the admins to request an iline or you can attempt to switch over to an IPv6 address and hope that is not banned.
If that does not work, you can disconnect the user. Connect to the bouncer (you must be an admin on ZNC), then issue the command:
/msg *controlpanel disconnect user network
Fixing a Network Configuration Error
Sometimes a disconnection error in znc.log is caused by bad network configuration:
[2021-01-25 03:06:24] [user/network] disconnected from IRC [2021-01-25 03:14:09] [user/network] disconnected from IRC
Let's investigate the cause through the web panel:
- Log in to the web panel to troubleshoot: https://bnc.fruit.ircnow.org/
Attach:znc1.png - Click on the Manage Users link
Attach:znc2.png - Click on the Edit link next to user1
Attach:znc3.png - Scroll down and click on the Edit link next to the network globalirc-it:
Attach:znc4.png - Check
Servers of this IRC network
:- The server may be improperly configured. Check the hostname and port is correct. A port without a + sign is in plaintext, which is usually port 6667. A port with a + in front uses SSL, which is usually on port 6697. If the user tries to use SSL on plaintext port 6667, or plaintext on SSL-encrypted port 6697, ZNC will fail to connect. Please fix this for the user.
- The user may be connecting to a server that lacks an iline. You will want to use the server addresses on the networks page to get the servers with ilines. You can test if your IP has been glined by using irssi.
- The user may be attempting to use an IPv4 address when we should prefer an IPv6 address. Some networks will disallow IPv4 connections. Run
$ host irc.example.com
to see if it returns an IPv4 address or only an IPv6 address. You will want to consult the networks list for IPv6-only hostnames. - The user may be glined from the network for abuse. In this case, see the section on stopping abuse.
- The SSL cert may be expired. There are two solutions: manually add the SSL fingerprint to the
SHA-256 fingerprint of trusted SSL certificates
orTrust All Certs
by clicking onDisable certificate validation
. Trusting all certs is less secure but less work than manually adding, so I recommend trusting all certs.
Attach:znc5.png
# Click onSave and Continue
Attach:znc6.png
You should soon see a line similar to below in znc.log:
[2021-01-25 03:15:08] [user/network] connected to IRC: irc.example.com
This indicates that user
successfully connected to network
.