Added logging so that changes made using the module show up in the Webmin Actions Log module.
---- Changes since 1.390 ----
Blacklist rules can now match any host.
+---- Changes since 1.480 ----
+Added a button to create a shorewall dump, thanks to a patch by Paul Gear.
--- /dev/null
+#!/usr/local/bin/perl
+# dump.cgi
+# Show a shorewall dump
+
+require './shorewall-lib.pl';
+&ui_print_header(undef, $text{'dump_title'}, "");
+print "<font size=-1><pre>";
+open(DUMP, "$config{'shorewall'} dump 2>&1 |");
+while(<DUMP>) {
+ print &html_escape($_);
+ }
+close(DUMP);
+print "</pre></font>\n";
+&ui_print_footer("", $text{'index_return'});
+
# chain in the filter table
print &ui_hr();
print "<table width=100%>\n";
- system("iptables -t filter -L shorewall -n >/dev/null 2>&1");
+ system("$config{'shorewall'} status 2>&1");
if ($?) {
# Down .. offer to start
# unless no permissions
print "<tr> <td><input type=submit ",
"value='$text{'index_check'}'></td>\n";
print "<td>$text{'index_checkdesc'}</td> </tr>\n";
+ print "</form>\n";
+ print "<form action=dump.cgi>\n";
+ print "<tr> <td><input type=submit ",
+ "value='$text{'index_dump'}'></td>\n";
+ print "<td>$text{'index_dumpdesc'}</td> </tr>\n";
+ print "</form>\n";
print "</table>\n";
}
}
index_stopdesc=Click this button to shut down Shorewall with the <tt>shorewall stop</tt> command. This will block access from all hosts except those in the When Stopped table.
index_status=Show Status
index_statusdesc=Click this button to view Shorewall's tables and rules from the <tt>shorewall status</tt> command.
+index_dump=Show Dump
+index_dumpdesc=Click this button to view Shorewall tracing information from the <tt>shorewall dump</tt> command.
index_check=Check Firewall
index_checkdesc=Click this button to have Shorewall validate your firewall configuration with the <tt>shorewall check</tt> command.
clear_err=Failed to clear firewall
stop_err=Failed to shut down firewall
status_title=Firewall Status
+dump_title=Firewall Dump
check_title=Check Firewall
check_ok=.. your firewall configuration looks OK.
check_failed=.. an error was found in your firewall configuration!