summaryrefslogtreecommitdiff
path: root/doc/snac.8
diff options
context:
space:
mode:
authorGravatar default2024-12-19 19:57:51 +0100
committerGravatar default2024-12-19 19:57:51 +0100
commit29ac9156e2301eccee492a3ec27ab8fb9168f192 (patch)
treefbb6b7771c0cee95f4e1542e68ddcf17fc15bc85 /doc/snac.8
parentUpdated RELEASE_NOTES. (diff)
downloadpenes-snac2-29ac9156e2301eccee492a3ec27ab8fb9168f192.tar.gz
penes-snac2-29ac9156e2301eccee492a3ec27ab8fb9168f192.tar.xz
penes-snac2-29ac9156e2301eccee492a3ec27ab8fb9168f192.zip
Updated documentation.
Diffstat (limited to '')
-rw-r--r--doc/snac.829
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/snac.8 b/doc/snac.8
index 54ae744..f5e4bd5 100644
--- a/doc/snac.8
+++ b/doc/snac.8
@@ -242,6 +242,12 @@ posts will not be direct ones, but proxied by
242This way, remote media servers will not see the user's IP, but the server one, 242This way, remote media servers will not see the user's IP, but the server one,
243improving privacy. Please take note that this will increase the server's incoming 243improving privacy. Please take note that this will increase the server's incoming
244and outgoing traffic. 244and outgoing traffic.
245.It Ic badlogin_retries
246If incorrect logins from a given IP address reach this count, subsequent attempts
247from it are rejected until the lock expires (default: 5 retries).
248.It Ic badlogin_expire
249The number of seconds a blocked IP address is ignored in login attempts
250(default: 300 seconds).
245.El 251.El
246.Pp 252.Pp
247You must restart the server to make effective these changes. 253You must restart the server to make effective these changes.
@@ -546,6 +552,22 @@ heavily on how all the servers involved behave. Just cross your fingers and hope
546Full instances can be blocked. This operation must be done from 552Full instances can be blocked. This operation must be done from
547the command-line tool. See 553the command-line tool. See
548.Xr snac 1 . 554.Xr snac 1 .
555.Pp
556.Ss Bad login throttling
557Since version 2.67, a simple logic to avoid brute force attacks against user passwords
558has been implemented: if, from a given IP address, the number of failed logins reaches
559a given threshold, further tries from that IP address are never successful until a timer
560expires. The maximum number of retries can be configured in the
561.Pa server.json
562file by setting the
563.Ic badlogin_retries
564variable, and the number of seconds the IP address unlock timer expires, in
565.Ic badlogin_expire .
566Please take note that, for this system to work, you must setup your web server proxy
567to pass the remote connection address in the
568.Ic X-Forwarded-For
569HTTP header (unless you use the FastCGI interface; if that's the case, you don't have
570to do anything).
549.Sh ENVIRONMENT 571.Sh ENVIRONMENT
550.Bl -tag -width Ds 572.Bl -tag -width Ds
551.It Ev DEBUG 573.It Ev DEBUG
@@ -603,35 +625,42 @@ example.com server section:
603location /fedi { 625location /fedi {
604 proxy_pass http://localhost:8001; 626 proxy_pass http://localhost:8001;
605 proxy_set_header Host $http_host; 627 proxy_set_header Host $http_host;
628 proxy_set_header X-Forwarded-For $remote_addr;
606} 629}
607# webfinger 630# webfinger
608location /.well-known/webfinger { 631location /.well-known/webfinger {
609 proxy_pass http://localhost:8001; 632 proxy_pass http://localhost:8001;
610 proxy_set_header Host $http_host; 633 proxy_set_header Host $http_host;
634 proxy_set_header X-Forwarded-For $remote_addr;
611} 635}
612# Mastodon API (entry points) 636# Mastodon API (entry points)
613location /api/v1/ { 637location /api/v1/ {
614 proxy_pass http://localhost:8001; 638 proxy_pass http://localhost:8001;
615 proxy_set_header Host $http_host; 639 proxy_set_header Host $http_host;
640 proxy_set_header X-Forwarded-For $remote_addr;
616} 641}
617location /api/v2/ { 642location /api/v2/ {
618 proxy_pass http://localhost:8001; 643 proxy_pass http://localhost:8001;
619 proxy_set_header Host $http_host; 644 proxy_set_header Host $http_host;
645 proxy_set_header X-Forwarded-For $remote_addr;
620} 646}
621# Mastodon API (OAuth support) 647# Mastodon API (OAuth support)
622location /oauth { 648location /oauth {
623 proxy_pass http://localhost:8001; 649 proxy_pass http://localhost:8001;
624 proxy_set_header Host $http_host; 650 proxy_set_header Host $http_host;
651 proxy_set_header X-Forwarded-For $remote_addr;
625} 652}
626# optional 653# optional
627location /.well-known/nodeinfo { 654location /.well-known/nodeinfo {
628 proxy_pass http://localhost:8001; 655 proxy_pass http://localhost:8001;
629 proxy_set_header Host $http_host; 656 proxy_set_header Host $http_host;
657 proxy_set_header X-Forwarded-For $remote_addr;
630} 658}
631# optional (needed by some Mastodon API clients) 659# optional (needed by some Mastodon API clients)
632location /.well-known/host-meta { 660location /.well-known/host-meta {
633 proxy_pass http://localhost:8001; 661 proxy_pass http://localhost:8001;
634 proxy_set_header Host $http_host; 662 proxy_set_header Host $http_host;
663 proxy_set_header X-Forwarded-For $remote_addr;
635} 664}
636.Ed 665.Ed
637.Pp 666.Pp