add: default policy
This commit is contained in:
@@ -15,10 +15,10 @@ class FirewallManager:
|
||||
nft.reset()
|
||||
|
||||
async def init(self):
|
||||
FiregexTables().init()
|
||||
nft.init()
|
||||
await self.reload()
|
||||
|
||||
async def reload(self):
|
||||
async with self.lock:
|
||||
nft.set(map(Rule.from_dict, self.db.query('SELECT * FROM rules WHERE active = 1 ORDER BY rule_id;')))
|
||||
nft.set(map(Rule.from_dict, self.db.query('SELECT * FROM rules WHERE active = 1 ORDER BY rule_id;')), policy=self.db.get('POLICY', 'accept'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user