summaryrefslogtreecommitdiffstats
path: root/iptables-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'iptables-model.lua')
-rw-r--r--iptables-model.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/iptables-model.lua b/iptables-model.lua
index e13048f..9b23a79 100644
--- a/iptables-model.lua
+++ b/iptables-model.lua
@@ -9,7 +9,7 @@ require("validator")
-- Set variables
local packagename = "iptables"
local servicename = "iptables"
-local rulesfile = "/var/lib/iptables/rules-save"
+local configfile = "/etc/conf.d/iptables"
local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin "
local tables = {"filter", "nat", "mangle"}
@@ -548,10 +548,12 @@ function delete_rule(tab, chain, pos)
end
function readrulesfile()
+ local rulesfile = format.get_ini_entry(fs.read_file(configfile) or "", "", "IPTABLES_SAVE")
return modelfunctions.getfiledetails(rulesfile)
end
function updaterulesfile(filedetails)
+ local rulesfile = format.get_ini_entry(fs.read_file(configfile) or "", "", "IPTABLES_SAVE")
return modelfunctions.setfiledetails(filedetails, {rulesfile})
end