1
- .\" @(#)$Id: iauth.conf.5,v 1.24 2014/08/25 14:08:57 bif Exp $
2
- .TH IAUTH.CONF 5 "$Date: 2014/08/25 14:08:57 $"
1
+ .\" @(#)$Id: iauth.conf.5,v 1.25 2014/09/03 10:50:01 bif Exp $
2
+ .TH IAUTH.CONF 5 "$Date: 2014/09/03 10:50:01 $"
3
3
.SH NAME
4
4
iauth.conf \- The Internet Relay Chat Authentication Configuration File
5
5
.SH DESCRIPTION
@@ -165,22 +165,50 @@ This module checks client IP against DNS BL.
165
165
166
166
This module understands three options:
167
167
.B log
168
- to log IP and connect date
168
+ to log IP and connect date;
169
169
.B reject
170
- to reject connections based on DNS BL
170
+ to reject connections based on DNS BL;
171
171
.B servers
172
172
comma separated list of DNS BL servers to query
173
- against for rejecting connecting hosts
173
+ against for rejecting connecting hosts.
174
+
175
+ .TP
176
+ .B pgsql
177
+ This module performs a basic logging of IPs to a PostgreSQL database and
178
+ can reject clients based on their IP. This module will not create tables
179
+ for you, you have to create them like this:
180
+ .RS
181
+ .RS
182
+ .nf
183
+ CREATE TABLE ircd_conn (ip cidr, date timestamp);
184
+ CREATE TABLE ircd_kline (ip cidr);
185
+ .fi
186
+ .RE
187
+ Also, you have to populate ircd_kline with IPs by other means, this module
188
+ will not do it for you. For performance sake, put the database on localhost.
189
+
190
+ This module understands three options:
191
+ .B log
192
+ to log IP and connect date to database (into ircd_conn table);
193
+ .B reject
194
+ to reject connections based on IP (searching ircd_kline table);
195
+ .B conn
196
+ is the database connection string; it is taken verbatim and as such must be the
197
+ last option.
198
+
199
+ Queries are not configurable. If you need different tables, field names
200
+ or queries, you have to edit the source.
174
201
175
202
.SH EXAMPLE
176
203
The following file will cause the IRC daemon to reject all connections
177
204
originating from a system where an open proxy is running for hosts within
178
205
*.fr and *.enserb.u-bordeaux.fr but not for other hosts matching
179
206
*.u-bordeaux.fr. For all connections, an ident lookup (RFC 1413) will be
180
- performed as well as checking for WWW proxy on port 8080 and 3128.
181
- In addition, every connection is authenticated with the LHEx
182
- server at IP-address 127.0.0.1. Client will be let in after ident and
183
- lhex are done but if socks or webproxy finds an open proxy, client will
207
+ performed, inserting connection logs to postgres, querying postgres for
208
+ banned IPs, as well as checking for WWW proxy on port 8080 and 3128 and
209
+ querying DNSBL. In addition, every connection is authenticated with the LHEx
210
+ server at IP-address 127.0.0.1. Client will be let in after ident, lhex and
211
+ pgsql are done but if socks, webproxy or dnsbl finds an open proxy, client will
184
212
be removed asap.
185
213
186
214
.RS
@@ -190,6 +218,10 @@ module rfc931
190
218
module lhex
191
219
option = 127.0.0.1
192
220
221
+ module pgsql
222
+ option = log,reject,conn=dbname=ircd password=secret host=localhost
223
+ reason = Denied access (SQL)
224
+
193
225
delayed
194
226
195
227
module socks
0 commit comments