Commit e8e6b6bd authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

set chain policy to ACCEPT in tables other than filter

parent 4172f22f
......@@ -66,9 +66,11 @@ function IPTables:dumpfile(family, iptfile)
for tbl, chains in pairs(self.config[family]) do
for chain, rules in pairs(chains) do
iptfile:write(':'..chain..' '..(awall.util.contains(builtin,
chain) and
'DROP' or '-')..' [0:0]\n')
local policy = '-'
if awall.util.contains(builtin, chain) then
policy = tbl == 'filter' and 'DROP' or 'ACCEPT'
iptfile:write(':'..chain..' '..policy..' [0:0]\n')
for chain, rules in pairs(chains) do
for i, rule in ipairs(rules) do
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment