diff options
| author | 2024-12-19 19:57:51 +0100 | |
|---|---|---|
| committer | 2024-12-19 19:57:51 +0100 | |
| commit | 29ac9156e2301eccee492a3ec27ab8fb9168f192 (patch) | |
| tree | fbb6b7771c0cee95f4e1542e68ddcf17fc15bc85 | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | penes-snac2-29ac9156e2301eccee492a3ec27ab8fb9168f192.tar.gz penes-snac2-29ac9156e2301eccee492a3ec27ab8fb9168f192.tar.xz penes-snac2-29ac9156e2301eccee492a3ec27ab8fb9168f192.zip | |
Updated documentation.
| -rw-r--r-- | doc/snac.8 | 29 |
1 files changed, 29 insertions, 0 deletions
| @@ -242,6 +242,12 @@ posts will not be direct ones, but proxied by | |||
| 242 | This way, remote media servers will not see the user's IP, but the server one, | 242 | This way, remote media servers will not see the user's IP, but the server one, |
| 243 | improving privacy. Please take note that this will increase the server's incoming | 243 | improving privacy. Please take note that this will increase the server's incoming |
| 244 | and outgoing traffic. | 244 | and outgoing traffic. |
| 245 | .It Ic badlogin_retries | ||
| 246 | If incorrect logins from a given IP address reach this count, subsequent attempts | ||
| 247 | from it are rejected until the lock expires (default: 5 retries). | ||
| 248 | .It Ic badlogin_expire | ||
| 249 | The number of seconds a blocked IP address is ignored in login attempts | ||
| 250 | (default: 300 seconds). | ||
| 245 | .El | 251 | .El |
| 246 | .Pp | 252 | .Pp |
| 247 | You must restart the server to make effective these changes. | 253 | You 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 | |||
| 546 | Full instances can be blocked. This operation must be done from | 552 | Full instances can be blocked. This operation must be done from |
| 547 | the command-line tool. See | 553 | the command-line tool. See |
| 548 | .Xr snac 1 . | 554 | .Xr snac 1 . |
| 555 | .Pp | ||
| 556 | .Ss Bad login throttling | ||
| 557 | Since version 2.67, a simple logic to avoid brute force attacks against user passwords | ||
| 558 | has been implemented: if, from a given IP address, the number of failed logins reaches | ||
| 559 | a given threshold, further tries from that IP address are never successful until a timer | ||
| 560 | expires. The maximum number of retries can be configured in the | ||
| 561 | .Pa server.json | ||
| 562 | file by setting the | ||
| 563 | .Ic badlogin_retries | ||
| 564 | variable, and the number of seconds the IP address unlock timer expires, in | ||
| 565 | .Ic badlogin_expire . | ||
| 566 | Please take note that, for this system to work, you must setup your web server proxy | ||
| 567 | to pass the remote connection address in the | ||
| 568 | .Ic X-Forwarded-For | ||
| 569 | HTTP header (unless you use the FastCGI interface; if that's the case, you don't have | ||
| 570 | to 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: | |||
| 603 | location /fedi { | 625 | location /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 |
| 608 | location /.well-known/webfinger { | 631 | location /.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) |
| 613 | location /api/v1/ { | 637 | location /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 | } |
| 617 | location /api/v2/ { | 642 | location /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) |
| 622 | location /oauth { | 648 | location /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 |
| 627 | location /.well-known/nodeinfo { | 654 | location /.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) |
| 632 | location /.well-known/host-meta { | 660 | location /.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 |