Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions NetworkManager.service.d/hardening.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_PACKET AF_UNIX
# these settings with either CapabilityBoundingSet=~CAP_SYS_ADMIN or
# SystemCallFilter=~@mount.

ProtectHome=yes
#♠ProtectHome= need to be able to access VPN cert that can be saved in /root or in ~/
ProtectSystem=strict
ProtectProc=invisible
ReadWritePaths=/etc -/proc/sys/net -/var/lib/NetworkManager/
Expand All @@ -35,7 +35,8 @@ PrivateTmp=yes
###########

PrivateDevices=yes
# DeviceAllow=/dev/exampledevice
DeviceAllow=/dev/net/tun
DeviceAllow=/dev/net/tap

##########
# Kernel #
Expand All @@ -53,7 +54,7 @@ CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SETUID CAP_SETGID CAP_SYS_CHROOT
# AmbientCapabilities= service runs as root
NoNewPrivileges=yes
ProtectHostname=yes
ProtectClock=yes
#ProtectClock= required if we want to use a VPN
ProtectControlGroups=yes
RestrictNamespaces=yes
LockPersonality=yes
Expand Down