SHA256
1
0
forked from pool/nftables
nftables/nftables.service
Matthias Gerstner 71d8541655
Implement nftables.service for static firewall configurations (bsc#1237277)
It seems users are missing this service which is not part of the
upstream project but present in most other Linux distributions. It
allows to setup simple static nftables based firewalls via configuration
files.
2025-02-27 12:01:17 +01:00

23 lines
600 B
Desktop File

[Unit]
Description=nftables static rule set
Documentation=file:/usr/share/doc/packages/nftables/README.SUSE
Wants=network-pre.target
Before=network-pre.target shutdown.target
Conflicts=shutdown.target
DefaultDependencies=no
AssertPathExists=/etc/nftables/rules/main.nft
[Service]
Type=oneshot
RemainAfterExit=yes
StandardInput=null
ProtectSystem=full
ProtectHome=true
AssertPathExists=/etc/nftables/rules/main.nft
ExecStart=/usr/sbin/nft -f /etc/nftables/rules/main.nft
ExecReload=/usr/sbin/nft -f /etc/nftables/rules/main.nft
ExecStop=/usr/sbin/nft flush ruleset
[Install]
WantedBy=sysinit.target