Accepting request 924959 from home:stroeder:network
- reworked nsd.service: * directly start as User=_nsd * even more hardening * removed commented and unused directives FWIW: This was successfully tested on Tumbleweed x86_64. OBS-URL: https://build.opensuse.org/request/show/924959 OBS-URL: https://build.opensuse.org/package/show/server:dns/nsd?expand=0&rev=90
This commit is contained in:
parent
3625623c92
commit
1c78b76f36
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 12 20:19:52 UTC 2021 - Michael Ströder <michael@stroeder.com>
|
||||||
|
|
||||||
|
- reworked nsd.service:
|
||||||
|
* directly start as User=_nsd
|
||||||
|
* even more hardening
|
||||||
|
* removed commented and unused directives
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 12 20:01:24 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
Tue Oct 12 20:01:24 UTC 2021 - Johannes Segitz <jsegitz@suse.com>
|
||||||
|
|
||||||
|
30
nsd.service
30
nsd.service
@ -3,6 +3,13 @@ Description=NSD DNS Server
|
|||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
PIDFile=/run/nsd/nsd.pid
|
||||||
|
ExecStart=/usr/sbin/nsd -d -c /etc/nsd/nsd.conf
|
||||||
|
ExecStopPost=/bin/rm -f /var/lib/nsd/xfrd.state
|
||||||
|
User=_nsd
|
||||||
|
Group=_nsd
|
||||||
|
|
||||||
# added automatically, for details please see
|
# added automatically, for details please see
|
||||||
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
@ -16,13 +23,22 @@ ProtectKernelLogs=true
|
|||||||
ProtectControlGroups=true
|
ProtectControlGroups=true
|
||||||
RestrictRealtime=true
|
RestrictRealtime=true
|
||||||
# end of automatic additions
|
# end of automatic additions
|
||||||
Type=simple
|
|
||||||
PIDFile=/run/nsd/nsd.pid
|
# even more hardening options
|
||||||
#EnvironmentFile=-/etc/sysconfig/nsd
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||||
#ExecStart=/usr/sbin/nsd -D -c /etc/nsd/nsd.conf $OTHER_NSD_OPTS
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
ExecStart=/usr/sbin/nsd -d -c /etc/nsd/nsd.conf
|
#RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
ExecStopPost=/bin/rm -f /var/lib/nsd/xfrd.state
|
PrivateTmp=yes
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
MountFlags=private
|
||||||
|
LockPersonality=yes
|
||||||
|
KeyringMode=private
|
||||||
|
RestrictNamespaces=yes
|
||||||
|
RestrictSUIDSGID=yes
|
||||||
|
DevicePolicy=closed
|
||||||
|
MemoryDenyWriteExecute=yes
|
||||||
|
SystemCallArchitectures=native
|
||||||
|
SystemCallFilter=~ @clock @cpu-emulation @debug @keyring @module @mount @raw-io @reboot @swap @obsolete @chown @privileged @resources @pkey @setuid
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user