server: tie regex filters to db_insert_ban
[rb-79.git] / rb79-ban-ip.1
bloba7d40d9efbcd3112366643921f587048bf51f663
1 .Dd 2017-05-23
2 .Dt RB79-BAN-IP 1
3 .Os
4 .Sh NAME
5 .Nm rb79-ban-ip
6 .Nd ban an IP address 
7 .Pq or range
8 from posting temporarily
9 .Sh SYNOPSIS
10 .Nm
11 .Oo
12 .Fl i
13 .Ar individual-ip
14 .Oc
15 .Oo
16 .Fl f
17 .Ar first-ip
18 .Fl l
19 .Ar last-ip
20 .Oc
21 .Oo
22 .Fl m
23 .Ar ban-message
24 .Oc
25 .Oo
26 .Fl b
27 .Ar board-name
28 .Oc
29 .Oo
30 .Fl u
31 .Ar banned-until
32 .Oc
33 .Oo
34 .Fl s
35 .Oc
36 .Sh DESCRIPTION
37 .Nm
38 Inserts a ban into the global
39 .Pq or board-specific 
40 database which will affect either
41 .Ar individual-ip
42 or all IP addresses between
43 .Pq inclusive
44 .Ar first-ip
45 and
46 .Ar last-ip .
47 .Sh OPTIONS
48 .Bl -tag -width Ds
49 .It Fl i
50 The IP address to ban, either in IPV4 or IPV6 format. This option is mutually exclusive with the
51 .Fl f ,
52 .Fl l
53 pair.
54 .It Fl f
55 The start of an IP address range to ban
56 .Pq inclusive ,
57 mutually exclusive with
58 .Fl i .
59 This option requires a matching
60 .Fl l .
61 .It Fl l
62 The end of an IP address range to ban
63 .Pq inclusive ,
64 mutually exclusive with
65 .Fl i .
66 This option requires a matching
67 .Fl f .
68 .It Fl m
69 The ban message to display. This may include HTML, as it dropped directly
70 .Pq without escaping
71 into a HTML page. If not specified, the ban message will be empty.
72 .It Fl u
73 The time, as a UTC timestamp, when the ban should expire. If not specified,
74 .Ar banned-until
75 defaults to the current timestamp, plus 604800 seconds
76 .Pq seven days .
77 .It Fl s
78 If set, don't display the end time on ban page.
79 .El
80 .Sh EXAMPLES
81 .Pp
82 .Dl % rb79-ban-ip -b m -f 100.0.0.0 -l 200.0.0.0 \e\ 
83 .Dl \& \& \& \& \& \& \& \& \& \& \& \& \& \& -u $(($(date +%s) + 600)) \e\ 
84 .Dl \& \& \& \& \& \& \& \& \& \& \& \& \& \& -m \*qcalm down\*q
85 .Pp
86 .Dl % rb79-ban-ip -i 127.0.0.1 -m 'You are the worst poster here.'
87 .Pp
88 .Dl % rb79-ban-ip -i 127.0.0.2 -u 9999999999999999 \e\ 
89 .Dl \& \& \& \& \& \& \& \& \& \& \& \& \& \& -m '<img src=\*q/misc/go-away.png\*q>'
90 .Pp
91 .Sh SEE ALSO
92 .Xr rb79 1
93 .Sh AUTHORS
94 .An De Rais Aq Mt derais@cock.li