fix nftables (firewall) mechanism
This commit is contained in:
@ -423,7 +423,8 @@ class Service:
|
||||
with open('f{FIREWALL_CONF}.tmp', 'w') as f:
|
||||
f.write(content.replace(prevline, line))
|
||||
os.rename('f{FIREWALL_CONF}.tmp', FIREWALL_CONF)
|
||||
unix_cmd('systemctl enable --now nftables')
|
||||
unix_cmd('systemctl restart nftables')
|
||||
unix_cmd('systemctl enable nftables')
|
||||
else:
|
||||
print('need sudo rights to modify firewall')
|
||||
|
||||
|
Reference in New Issue
Block a user