summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/controller
diff options
context:
space:
mode:
Diffstat (limited to 'modules/admin-full/luasrc/controller')
-rw-r--r--modules/admin-full/luasrc/controller/admin/status.lua19
1 files changed, 18 insertions, 1 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/status.lua b/modules/admin-full/luasrc/controller/admin/status.lua
index 09e7766c1f..fd61459e99 100644
--- a/modules/admin-full/luasrc/controller/admin/status.lua
+++ b/modules/admin-full/luasrc/controller/admin/status.lua
@@ -19,7 +19,8 @@ function index()
entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20).index = true
entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"), 1)
- entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernelprotokoll"), 2)
+ entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernelprotokoll"), 2)
+ entry({"admin", "status", "iptables"}, call("action_iptables"), i18n("a_s_ipt", "Firewall"), 3)
end
function action_syslog()
@@ -31,3 +32,19 @@ function action_dmesg()
local dmesg = luci.sys.dmesg()
luci.template.render("admin_status/dmesg", {dmesg=dmesg})
end
+
+function action_iptables()
+ if luci.http.formvalue("zero") == "1" then
+ luci.util.exec("iptables -Z")
+ luci.http.redirect(
+ luci.dispatcher.build_url("admin", "status", "iptables")
+ )
+ elseif luci.http.formvalue("restart") == "1" then
+ luci.util.exec("/etc/init.d/firewall restart")
+ luci.http.redirect(
+ luci.dispatcher.build_url("admin", "status", "iptables")
+ )
+ else
+ luci.template.render("admin_status/iptables")
+ end
+end