Prevent logging of IP addresses #15041

Closed
opened 2025-11-02 11:28:46 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @sokai on GitHub (Oct 20, 2025).

Feature Description

Hey,

I stumbled over the fact, that it seems not possible to prevent logging of full IP addresses in the logs.

This an example log clip (w/ some redactions):

[…]
[…] Accepted publickey for git from IP_ALLOWED port 33330 ssh2: ED25519 SHA256:+REDACTED
[…] Received disconnect from IP_ALLOWED port 33330:11: disconnected by user
[…] Disconnected from user git IP_ALLOWED port 33330
[…] Invalid user www-data from 142.93.X.X port 33436
[…] Invalid user deploy from 49.204.X.X port 52108
[…] Received disconnect from 49.204.X.X port 52108:11: Bye Bye [preauth]
[…] Disconnected from invalid user deploy 49.204.X.X port 52108 [preauth]
[…] Connection closed by invalid user www-data 142.93.X.X port 33436 [preauth]
[…] Invalid user zs from 59.3.X.X port 50206
[…] Received disconnect from 59.3.X.X port 50206:11: Bye Bye [preauth]
[…] Disconnected from invalid user zs 59.3.X.X port 50206 [preauth]

… with this config:

[log]
LEVEL = Warn
MODE = console

Question/Request: Is it possible (= may it become possible) to prevent logging of full IP addresses?
(Reason: I'd like to only log IP address subnets – e. g. 59.3.0.0 – to be GDPR compliant …)

Thanks an KR!

Screenshots

No response

Originally created by @sokai on GitHub (Oct 20, 2025). ### Feature Description Hey, I stumbled over the _fact_, that it seems not possible to prevent logging of full IP addresses in the logs. This an example log clip (w/ some redactions): ```logs […] […] Accepted publickey for git from IP_ALLOWED port 33330 ssh2: ED25519 SHA256:+REDACTED […] Received disconnect from IP_ALLOWED port 33330:11: disconnected by user […] Disconnected from user git IP_ALLOWED port 33330 […] Invalid user www-data from 142.93.X.X port 33436 […] Invalid user deploy from 49.204.X.X port 52108 […] Received disconnect from 49.204.X.X port 52108:11: Bye Bye [preauth] […] Disconnected from invalid user deploy 49.204.X.X port 52108 [preauth] […] Connection closed by invalid user www-data 142.93.X.X port 33436 [preauth] […] Invalid user zs from 59.3.X.X port 50206 […] Received disconnect from 59.3.X.X port 50206:11: Bye Bye [preauth] […] Disconnected from invalid user zs 59.3.X.X port 50206 [preauth] ``` … with this config: ```ini [log] LEVEL = Warn MODE = console ``` **Question**/_Request_: Is it possible _(= may it become possible)_ to prevent logging of full IP addresses? (Reason: I'd like to only log IP address subnets – e. g. `59.3.0.0` – to _be GDPR compliant_ …) Thanks an KR! ### Screenshots _No response_
GiteaMirror added the type/question label 2025-11-02 11:28:46 -06:00
Author
Owner

@techknowlogick commented on GitHub (Oct 20, 2025):

This is due to SSHD logging that it's showing up. If you don't want SSHD to output this information you are able to use the rootless image.

@techknowlogick commented on GitHub (Oct 20, 2025): This is due to SSHD logging that it's showing up. If you don't want SSHD to output this information you are able to use the rootless image.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15041