From 7cd319e88461c9ef700d4925b236b5091aef00a1 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Sat, 1 Dec 2007 08:19:17 +0000 Subject: Cleaning up dir and some code git-svn-id: svn://svn.alpinelinux.org/acf/shorewall/trunk@397 ab2d0c66-481e-0410-8bed-d214d4d58bed --- firewall.cfg | 44 ---------------------------- shorewall-check-html.lsp | 27 ++++++++++++++++++ shorewall-edit-html.lsp | 38 ++++--------------------- shorewall-model.lua | 2 +- shorewall-read-html.lsp | 34 +++------------------- shorewall-restart-html.lsp | 71 ---------------------------------------------- shorewall-stop-html.lsp | 71 ---------------------------------------------- 7 files changed, 38 insertions(+), 249 deletions(-) delete mode 100644 firewall.cfg create mode 100644 shorewall-check-html.lsp delete mode 100644 shorewall-restart-html.lsp delete mode 100644 shorewall-stop-html.lsp diff --git a/firewall.cfg b/firewall.cfg deleted file mode 100644 index 0a143d4..0000000 --- a/firewall.cfg +++ /dev/null @@ -1,44 +0,0 @@ --- /* vim: set filetype=lua : */ -{ app="firewall", section="general", - name="params", filename="/etc/shorewall/params", - descr="Define variables used in the other configuration files." }, -{ app="firewall", section="general", - name="shorewall", filename="/etc/shorewall/shorewall.conf", - descr="Modify global configuration settings." }, -{ app="firewall", section="firewalling", - name="zones", filename="/etc/shorewall/zones", - descr="Name network partitions. Firewall rules are applied to defined zones." }, -{ app="firewall", section="firewalling", - name="interfaces", filename="/etc/shorewall/interfaces", - descr="Map physical interfaces to named zones." }, -{ app="firewall", section="firewalling", - name="hosts", filename="/etc/shorewall/hosts", - descr="Name specific hosts within zones." }, -{ app="firewall", section="firewalling", - name="policy", filename="/etc/shorewall/policy", - descr="Set default rules (policies) for zones." }, -{ app="firewall", section="firewalling", - name="rules", filename="/etc/shorewall/rules", - descr="Define exceptions to policies." }, -{ app="firewall", section="firewalling", - name="routestopped", filename="/etc/shorewall/routestopped", - descr="Define hosts that can access this host when the firewall is \"stopped\"" }, -{ app="firewall", section="firewalling", - name="tunnels", filename="/etc/shorewall/tunnels", - descr="Specify ipsec tunnel endpoints" }, -{ app="firewall", section="firewalling", - name="blacklist", filename="/etc/shorewall/blacklist", - descr="List ip addresses or names that should be denied all access to the firewall." }, -{ app="firewall", section="nat", - name="masq", filename="/etc/shorewall/masq", - descr="Define dynamic Masquerading or DNAT tables" }, -{ app="firewall", section="nat", - name="nat", filename="/etc/shorewall/nat", - descr="Define static Network Address Translation table" }, -{ app="firewall", section="qos", - name="tos", filename="/etc/shorewall/tos", - descr="Specify type of service markers for packets traversing the firewall." }, -{ app="firewall", section="qos", - name="tcrules", filename="/etc/shorewall/tcrules", - descr="Define traffic control rules." }, - diff --git a/shorewall-check-html.lsp b/shorewall-check-html.lsp new file mode 100644 index 0000000..0378928 --- /dev/null +++ b/shorewall-check-html.lsp @@ -0,0 +1,27 @@ + + +

Firewall configuration

+ +

SHOREWALL CHECK RESULT

+ + +

SHOW CONFIG FILES

+ +
+
Provide a autogenerated list of files in '/etc/shorewall'.
+ +

MANAGEMENT

+ +
Preform check of configs
+
+ +
Preform restart of firewall
+
" method="POST">
+ + + diff --git a/shorewall-edit-html.lsp b/shorewall-edit-html.lsp index 86d5507..f9ce486 100644 --- a/shorewall-edit-html.lsp +++ b/shorewall-edit-html.lsp @@ -2,40 +2,8 @@ -

Edit configuration

- ------------- START DEBUG INFORMATION ------------ -

THIS VIEW CONTAINS THE FOLLOWING VARIABLES/TABLES

-") -for a,b in pairs(view) do - if not (type(b) == "table") then - print ("" .. a .. ": >" .. b .. "<
") - else - print ("" .. a .. ":...
") - for c,d in pairs(view[a]) do - if not (type(d) == "table") then - print (" { " .. c .. ": >" .. d .. "< }
") - else - print (" { " .. c .. ":...
") - for e,f in pairs(view[a][c]) do - if not (type(f) == "table") then - print (" { { " .. e .. ": >" .. f .. "< } }
") - else - print (" { { " .. e .. ":... (table is not visible at the moment)
") - end - end - end - end - end -a,b,c,d,e,f,g,h,i,j = nil,nil,nil,nil,nil,nil,nil,nil,nil,nil -end -print ("------------ END DEBUG INFORMATION ------------
") -?> - -

Details

File name
@@ -55,6 +23,12 @@ print ("------------ END DEBUG INFORMATION ------------")

+ diff --git a/shorewall-model.lua b/shorewall-model.lua index ca26ca8..311ad86 100644 --- a/shorewall-model.lua +++ b/shorewall-model.lua @@ -23,7 +23,7 @@ end function check_config () check = nil check = {} - local f,err = io.popen("/etc/init.d/shorewall check") + local f,err = io.popen("/bin/echo -n '>> Check starts at: ';/bin/date; /bin/echo; /etc/init.d/shorewall check; /bin/echo; /bin/echo -n '>> Check stops at: '; /bin/date;") check.result = f:read("*a") f:close() check["error"]=err diff --git a/shorewall-read-html.lsp b/shorewall-read-html.lsp index 7f23c8f..5910c30 100644 --- a/shorewall-read-html.lsp +++ b/shorewall-read-html.lsp @@ -92,35 +92,9 @@
Involves black list, ECN control rules, and traffic shaping...
--]] ?> - - - -

THIS VIEW CONTAINS THE FOLLOWING VARIABLES/TABLES

------------- START DEBUG INFORMATION ------------
") -for a,b in pairs(view) do - if not (type(b) == "table") then - print ("" .. a .. ": >" .. b .. "<
") - else - print ("" .. a .. ":...
") - for c,d in pairs(view[a]) do - if not (type(d) == "table") then - print (" { " .. c .. ": >" .. d .. "< }
") - else - print (" { " .. c .. ":...
") - for e,f in pairs(view[a][c]) do - if not (type(f) == "table") then - print (" { { " .. e .. ": >" .. f .. "< } }
") - else - print (" { { " .. e .. ":... (table is not visible at the moment)
") - end - end - end - end - end -a,b,c,d,e,f,g,h,i,j = nil,nil,nil,nil,nil,nil,nil,nil,nil,nil -end -print ("------------ END DEBUG INFORMATION ------------
") +--[[ DEBUG INFORMATION +require("debugs") +io.write(debugs.variables(view)) +--]] ?> - diff --git a/shorewall-restart-html.lsp b/shorewall-restart-html.lsp deleted file mode 100644 index 53d81b7..0000000 --- a/shorewall-restart-html.lsp +++ /dev/null @@ -1,71 +0,0 @@ -

diff --git a/shorewall-stop-html.lsp b/shorewall-stop-html.lsp deleted file mode 100644 index 53d81b7..0000000 --- a/shorewall-stop-html.lsp +++ /dev/null @@ -1,71 +0,0 @@ -

-- cgit v1.2.3