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), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- rsyslog.conf(5), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
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-19 by Sn0wAlice on 20.04, Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic. Passes on stock image (journal-remote absent, rsyslog network inputs commented out); kept after full remediation and reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 22.04, Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic. Passes on stock image (journal-remote absent, rsyslog network inputs commented out); kept after full remediation and reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 24.04, Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic. Passes on stock image (journal-remote absent, rsyslog network inputs commented out); kept after full remediation and reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 26.04, Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic. Passes on stock image (journal-remote absent, rsyslog network inputs commented out); kept after full remediation and reboot. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-19, 2026-10-19 |
| Translations | fr |