core: firewall integration with ControlGroupNFTSet=
New directive `ControlGroupNFTSet=` provides a method for integrating services
into firewall rules with NFT sets.
Example:
```
table inet filter {
...
set timesyncd {
type cgroupsv2
}
chain ntp_output {
socket cgroupv2 != @timesyncd counter drop
accept
}
...
}
```
/etc/systemd/system/systemd-timesyncd.service.d/override.conf
```
[Service]
ControlGroupNFTSet=inet:filter:timesyncd
```
```
$ sudo nft list set inet filter timesyncd
table inet filter {
set timesyncd {
type cgroupsv2
elements = { "system.slice/systemd-timesyncd.service" }
}
}
```
This commit is contained in:
committed by
Topi Miettinen
parent
ab51fd9dbd
commit
c0548df0a2
@@ -28,6 +28,7 @@ Capabilities=
|
||||
CapabilityBoundingSet=
|
||||
ConfigurationDirectory=
|
||||
ConfigurationDirectoryMode=
|
||||
ControlGroupNFTSet=
|
||||
CoredumpFilter=
|
||||
DefaultMemoryLow=
|
||||
DefaultMemoryMin=
|
||||
|
||||
@@ -8,6 +8,7 @@ BlockIODeviceWeight=
|
||||
BlockIOReadBandwidth=
|
||||
BlockIOWeight=
|
||||
BlockIOWriteBandwidth=
|
||||
ControlGroupNFTSet=
|
||||
CPUAccounting=
|
||||
CPUQuota=
|
||||
CPUQuotaPeriodSec=
|
||||
|
||||
@@ -72,6 +72,7 @@ ConditionSecurity=
|
||||
ConditionUser=
|
||||
ConditionVirtualization=
|
||||
Conflicts=
|
||||
ControlGroupNFTSet=
|
||||
DefaultDependencies=
|
||||
Description=
|
||||
Documentation=
|
||||
|
||||
@@ -8,6 +8,7 @@ BlockIODeviceWeight=
|
||||
BlockIOReadBandwidth=
|
||||
BlockIOWeight=
|
||||
BlockIOWriteBandwidth=
|
||||
ControlGroupNFTSet=
|
||||
CPUAccounting=
|
||||
CPUQuota=
|
||||
CPUQuotaPeriodSec=
|
||||
|
||||
@@ -33,6 +33,7 @@ Capabilities=
|
||||
CapabilityBoundingSet=
|
||||
ConfigurationDirectory=
|
||||
ConfigurationDirectoryMode=
|
||||
ControlGroupNFTSet=
|
||||
CoredumpFilter=
|
||||
DefaultMemoryLow=
|
||||
DefaultMemoryMin=
|
||||
|
||||
@@ -28,6 +28,7 @@ Capabilities=
|
||||
CapabilityBoundingSet=
|
||||
ConfigurationDirectory=
|
||||
ConfigurationDirectoryMode=
|
||||
ControlGroupNFTSet=
|
||||
CoredumpFilter=
|
||||
DefaultMemoryLow=
|
||||
DefaultMemoryMin=
|
||||
|
||||
Reference in New Issue
Block a user