Protect your UnrealIRCd network behind a beautiful and clean integration with Google reCAPTCHA.
When a user is connecting to your server and they match the criteria you specified, they will be greeted with a link to a verification page covered with Google reCAPTCHA v3.
When they follow this link and click the button (and whatever else form elements you specify), their connection to IRC will be automatically continued (no need for pasting codes into IRC).
[08:19:44] -irc.example.com- VPS users from OVH are required to prove humanity.
[08:19:44] -irc.example.com- https://example.com/verify/?t=jrzm3Nwm3XTH8UKq
This package comes in two parts:
- UnrealIRCd Module (this)
- Webpage you can put anywhere (installed separately)
- UnrealIRCd 6.1.8 or higher with RPC configured
- A webserver (apache2/nginx)
- PHP
- Composer
- A Google account and reCAPTCHA keys (see link)
- Install UnrealIRCd module:
./unrealircd module install third/google-recaptcha - Install the required webpage to your preferred location (see link)
- Configure your
unrealircd.confto include the module settings to point to your webpage (see below) - Rehash your IRCd (
./unrealircd rehashfrom your terminal or/rehashfrom IRC) - Set an RLINE to match a mask. Supports Extended Server Bans.
The minimal configuration required for this module to work is as follows:
url- The URL for the verification webpage from Step 2
recaptcha {
url 'https://example.com/verify/'; // Remember to use single-quotes here
}
There are two other optional configuration settings:
ipcache- This is a time value setting between0and99d(e.g12hor4w) and determines how long to remember an IP after they were successful in completing reCAPTCHA. Users from this IP won't have to complete a reCAPTCHA when they reconnect. Set this to 0 if you don't want to cache.timeout- This is a time value setting between30sand5m(e.g1mor2m30s) and determines how long a user will have to complete the reCAPTCHA. After this time, if the user has not fully connected, the connection will terminate with the reason "Google reCAPTCHA required to connect".
Complete example using the default values:
recaptcha {
url 'https://example.org/verify/';
ipcache 1w; // 1 week
timeout 1m; // 1 minute
}
Syntax (note: using a nick resolves to their *@iphost):
RLINE <mask|nick> <duration> <reason>
UNRLINE <mask|nick>
RLINE (reCAPTCHA-Line) and UNRLINE a TKL-Like command which lets you define which connections are required to complete a reCAPTCHA. The reason you specify here will be the message displayed to the user upon connect.
This command supports Extended Server Bans. It is recommended that you combine this with Security Groups (video tutorial). Here are some examples:
/RLINE ~security-group:unknown-users 0 New users are required to prove their humanity.
/RLINE ~asn:16276 4w VPS users from OVH are required to prove humanity.
/RLINE ~account:0 0 Guests are required to prove humanity.
/RLINE *@8.8.1.1 0 Google Bots must complete Google reCAPTCHA lmao.
/RLINE Valware 24h Oops, you look like a bot, please verify your humanity.
/UNRLINE ~account:0
/UNRLINE *@8.8.1.1