mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
One of the fundamental counters we need to cover in metrics are packet/byte counters on network interfaces. Let's add this. We do this separately from networkd, to not unnecessarily affect networkd operations.
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=Network Statistics Report Service
|
|
Documentation=man:systemd-report-netstat@.service(8)
|
|
DefaultDependencies=no
|
|
Conflicts=shutdown.target
|
|
Before=shutdown.target
|
|
|
|
[Service]
|
|
# Note that PrivateNetwork= is deliberately not used here, as this service is supposed to report on the
|
|
# network interfaces of the host.
|
|
CapabilityBoundingSet=
|
|
DeviceAllow=
|
|
DynamicUser=yes
|
|
IPAddressDeny=any
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
PrivateDevices=yes
|
|
PrivateIPC=yes
|
|
PrivateTmp=disconnected
|
|
ProtectControlGroups=yes
|
|
ProtectHome=yes
|
|
ProtectHostname=yes
|
|
ProtectKernelLogs=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectSystem=strict
|
|
RestrictAddressFamilies=AF_UNIX AF_NETLINK
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
RestrictSUIDSGID=yes
|
|
RuntimeMaxSec=1min
|
|
SystemCallArchitectures=native
|
|
SystemCallErrorNumber=EPERM
|
|
SystemCallFilter=@system-service
|
|
ExecStart={{LIBEXECDIR}}/systemd-report-netstat
|