Skip to content

Commit 4048e18

Browse files
committed
PR/15: robohack: Document the output format of blocklistctl and grammar fixes.
1 parent 8bc655a commit 4048e18

2 files changed

Lines changed: 47 additions & 9 deletions

File tree

external/bsd/blocklist/bin/blocklistctl.8

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.\" $NetBSD: blocklistctl.8,v 1.2 2020/06/15 02:29:44 christos Exp $
1+
.\" $NetBSD: blocklistctl.8,v 1.3 2025/01/27 17:23:25 christos Exp $
22
.\"
33
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
44
.\" All rights reserved.
@@ -27,25 +27,34 @@
2727
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2828
.\" POSSIBILITY OF SUCH DAMAGE.
2929
.\"
30-
.Dd June 7, 2016
30+
.Dd January 27, 2025
3131
.Dt BLOCKLISTCTL 8
3232
.Os
3333
.Sh NAME
3434
.Nm blocklistctl
35-
.Nd display and change the state of blocklistd
35+
.Nd display and change the state of the blocklistd database
3636
.Sh SYNOPSIS
3737
.Nm
3838
.Cm dump
3939
.Op Fl abdnrw
4040
.Sh DESCRIPTION
4141
.Nm
42-
is a program used to display the state of
42+
is a program used to display and change the state of the
4343
.Xr blocklistd 8
44+
database.
45+
The following sub-commands are supported:
46+
.Ss dump
4447
.Pp
45-
The following options are available:
48+
The following options are available for the
49+
.Cm dump
50+
sub-command:
4651
.Bl -tag -width indent
4752
.It Fl a
48-
Show all database entries, by default it shows only the embryonic ones.
53+
Show all database entries, by default it shows only the active ones.
54+
Inactive entries will be shown with a last-access (or, with
55+
.Fl r ,
56+
the remaining) time of
57+
.Ql never .
4958
.It Fl b
5059
Show only the blocked entries.
5160
.It Fl d
@@ -59,6 +68,35 @@ Normally the width of addresses is good for IPv4, the
5968
.Fl w
6069
flag, makes the display wide enough for IPv6 addresses.
6170
.El
71+
.Pp
72+
The output of the
73+
.Cm dump
74+
sub-command consists of a header (unless
75+
.Fl h
76+
was given) and one line for each record in the database, where each line
77+
has the following columns:
78+
.Bl -tag -width indent
79+
.It Ql address/ma:port
80+
The remote address, mask, and local port number of the client connection
81+
associated with the database entry.
82+
.It Ql id
83+
column will show the identifier for the packet filter rule associated
84+
with the database entry, though this may only be the word
85+
.Ql OK
86+
for packet filters which do not creat a unique identifier for each rule.
87+
.It Ql nfail
88+
The number of
89+
.Em failures
90+
reported for the client on the noted port, as well as the number of
91+
failures allowed before blocking (or, with
92+
.Fl a ,
93+
an asterisk
94+
.Aq * )
95+
.It So last access Sc | So remaining time Sc
96+
The last time a the client was reported as attempting access, or, with
97+
.Fl r ,
98+
the time remaining before the rule blocking the client will be removed.
99+
.El
62100
.Sh SEE ALSO
63101
.Xr blocklistd 8
64102
.Sh NOTES

external/bsd/blocklist/bin/blocklistd.8

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.\" $NetBSD: blocklistd.8,v 1.3 2024/07/28 12:48:11 bad Exp $
1+
.\" $NetBSD: blocklistd.8,v 1.4 2025/01/27 17:23:25 christos Exp $
22
.\"
33
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
44
.\" All rights reserved.
@@ -27,7 +27,7 @@
2727
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2828
.\" POSSIBILITY OF SUCH DAMAGE.
2929
.\"
30-
.Dd April 21, 2020
30+
.Dd January 27, 2025
3131
.Dt BLOCKLISTD 8
3232
.Os
3333
.Sh NAME
@@ -161,7 +161,7 @@ The action to perform:
161161
.Dv add ,
162162
.Dv rem ,
163163
or
164-
.Dv flush
164+
.Dv flush ;
165165
to add, remove or flush a firewall rule.
166166
.It name
167167
The rule name.

0 commit comments

Comments
 (0)