diff --git a/ansible/roles/polkadot-validator/templates/polkadot.service.j2 b/ansible/roles/polkadot-validator/templates/polkadot.service.j2 index e106aa75..e6053a00 100644 --- a/ansible/roles/polkadot-validator/templates/polkadot.service.j2 +++ b/ansible/roles/polkadot-validator/templates/polkadot.service.j2 @@ -30,6 +30,27 @@ ExecStart=/usr/local/bin/polkadot \ {% endif %} Restart=always +CapabilityBoundingSet= +LockPersonality=true +NoNewPrivileges=true +PrivateDevices=true +PrivateMounts=true +PrivateTmp=true +PrivateUsers=true +ProtectClock=true +ProtectControlGroups=true +ProtectHostname=true +ProtectKernelModules=true +ProtectKernelTunables=true +ProtectSystem=strict +RemoveIPC=true +RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX +RestrictNamespaces=true +RestrictSUIDSGID=true +SystemCallArchitectures=native +SystemCallFilter=@system-service +SystemCallFilter=~@clock @module @mount @reboot @swap @privileged +UMask=0027 [Install] WantedBy=multi-user.target