"IPs in ban list" shows 0
I use ocserv-exporter to get metrics. It refers to the output occtl --json show status and gives the output in the form of metrics. I found that the metric vpn_ips_banned, which is obtained from the IPs in ban list field, is always 0, even if the ban currently exists. At the same time, the ban is indeed present in the output of occtl --json show ip bans.
# ocserv --version
OpenConnect VPN Server 1.3.0
Compiled with: seccomp, oath, radius, gssapi, PAM, PKCS#11, AnyConnect, oidc_auth
GnuTLS version: 3.8.3
root@openconnect:~# occtl --json show status
{
"Status": "online",
"Server PID": 1261,
"Sec-mod PID": 1263,
"Sec-mod instance count": 4,
"Up since": "2025-12-09 14:02",
"_Up since": "20h:42m",
"raw_up_since": 1765288944,
"uptime": 74559,
"Active sessions": 0,
"Total sessions": 5,
"Total authentication failures": 8,
"IPs in ban list": 0, # <====
"Median latency": "<1ms",
"raw_median_latency": 0,
"STDEV latency": "<1ms",
"raw_stdev_latency": 0,
"Last stats reset": "2025-12-09 14:02",
"_Last stats reset": "20h:42m",
"raw_last_stats_reset": 1765288944,
"Sessions handled": 5,
"Timed out sessions": 0,
"Timed out (idle) sessions": 0,
"Closed due to error sessions": 0,
"Authentication failures": 8,
"Average auth time": " 1s",
"raw_avg_auth_time": 1,
"Max auth time": " 8s",
"raw_max_auth_time": 8,
"Average session time": "11m:00s",
"raw_avg_session_time": 660,
"Max session time": "27m:00s",
"raw_max_session_time": 1620,
"Min MTU": 1300,
"Max MTU": 1300,
"RX": "39.5 MB",
"raw_rx": 39549000,
"TX": "1.2 GB",
"raw_tx": 1157216000
}
root@openconnect:~# occtl --json show ip bans
[
{
"IP": "xx.xx.6.90",
"Since": "2025-12-10 10:43",
"_Since": " ? ",
"Score": 122
}
]