Description
Two services can receive logs from other hosts:
systemd-journal-remote(packagesystemd-journal-remote), started by its socket unitsystemd-journal-remote.socketor its service;- rsyslog, when an input module for the network is loaded:
imtcp,imudporimrelp.
This control requires both to be off: the journal-remote units disabled or masked (or absent),
and no network input in /etc/rsyslog.conf or /etc/rsyslog.d/*.conf.
systemd-journal-upload, which sends the local journal to a remote server, ships in the same
package and is not affected.
Rationale
A receiver is a network service that parses untrusted input, and lets anyone who can reach the port inject false entries or flood the disk. Only a dedicated log server should run one.
Impact
Systems that are central log servers must be excluded from this control in the tailoring file.
Setting
| Location | systemd units systemd-journal-remote.socket/.service, /etc/rsyslog.conf, /etc/rsyslog.d/ |
| Default | Not installed, rsyslog network inputs commented out |
| Recommended | Units disabled or absent, no imtcp/imudp/imrelp input |
Audit
- Run
systemctl is-enabled systemd-journal-remote.socket systemd-journal-remote.service. Each must printdisabled,maskedor report that the unit does not exist. - If rsyslog is installed, run
grep -E '^\s*(module\(load="?im(tcp|udp|relp)|input\(type="?im(tcp|udp|relp)|\$ModLoad\s+im(tcp|udp|relp))' /etc/rsyslog.conf /etc/rsyslog.d/*.conf. It must print nothing.
Automated: every check must pass. Scanners report each check by its id.
journal-remote-socket
systemd-journal-remote.socket is not enabled.
unit: systemd-journal-remote.socket
state: disabled
journal-remote-service
systemd-journal-remote.service is not enabled.
unit: systemd-journal-remote.service
state: disabled
rsyslog-conf
No network input module in /etc/rsyslog.conf.
path: /etc/rsyslog.conf
pattern: ^\s*(module\(load="?im(tcp|udp|relp)|input\(type="?im(tcp|udp|relp)|\$ModLoad\s+im(tcp|udp|relp))
expect: no_match
rsyslog-dropins
No network input module in /etc/rsyslog.d/*.conf.
path: /etc/rsyslog.d/*.conf
pattern: ^\s*(module\(load="?im(tcp|udp|relp)|input\(type="?im(tcp|udp|relp)|\$ModLoad\s+im(tcp|udp|relp))
expect: no_match
Remediation
- Run
systemctl disable --now systemd-journal-remote.socket systemd-journal-remote.service, or remove thesystemd-journal-remotepackage ifsystemd-journal-uploadis not used. - In
/etc/rsyslog.confand/etc/rsyslog.d/*.conf, comment out themodule(load="imtcp"),module(load="imudp"),module(load="imrelp")and matchinginput(...)lines, then runsystemctl restart rsyslog.
| Restart | none |
| Disruption | low |
Rollback
Run systemctl enable --now systemd-journal-remote.socket, and restore the rsyslog input lines.
journal-remote-socket
Generated from check journal-remote-socket: the engine writes the fix for every output, it sets the expected value and the check runs again after.
journal-remote-service
Generated from check journal-remote-service: the engine writes the fix for every output, it sets the expected value and the check runs again after.
Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.
References
- systemd-journal-remote.service(8), Debian manual pages Debian, vendor-doc, accessed 2026-10-18
- rsyslog.conf(5), Debian manual pages Debian, vendor-doc, accessed 2026-10-18
Mappings
| Framework | ID | Relation |
|---|---|---|
| ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0 | R71 | related |
| NIST SP 800-53 Rev. 55.1.1 | CM-7 | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
People and lifecycle
| Authors |
|
| Verified | 2026-10-18 by Sn0wAlice on 12, Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64, BIOS boot. Passes on fresh install; imtcp input added in rsyslog.d makes it fail as expected. |
| Verified | 2026-10-18 by Sn0wAlice on 13, Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64, BIOS boot. Passes on fresh install; imtcp input added in rsyslog.d makes it fail as expected. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-18, 2026-10-18 |
| Translations | fr |