From 696627082208dfdf14b29c5f2146af199fcd2a7a Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 19 Feb 2017 13:43:23 -0800 Subject: [PATCH] Allow 'show action' on buitin actions Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 10 +--------- Shorewall/Actions/action.Limit | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.allowBcast | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.allowMcast | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.allowUPnP | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.dropBcast | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.dropMcast | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.dropNotSyn | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.forwardUPnP | 27 +++++++++++++++++++++++++++ Shorewall/Actions/action.rejNotSyn | 27 +++++++++++++++++++++++++++ 10 files changed, 244 insertions(+), 9 deletions(-) create mode 100644 Shorewall/Actions/action.Limit create mode 100644 Shorewall/Actions/action.allowBcast create mode 100644 Shorewall/Actions/action.allowMcast create mode 100644 Shorewall/Actions/action.allowUPnP create mode 100644 Shorewall/Actions/action.dropBcast create mode 100644 Shorewall/Actions/action.dropMcast create mode 100644 Shorewall/Actions/action.dropNotSyn create mode 100644 Shorewall/Actions/action.forwardUPnP create mode 100644 Shorewall/Actions/action.rejNotSyn diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 5674a8378..f97c4bb5e 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -1451,15 +1451,7 @@ show_command() { fi done - case $2 in - allowBcast|dropBcast|dropNotSyn|rejNotSyn|allowinUPnp|forwardUPnP|Limit) - echo " WARNING: $2 is a built-in action" >&2 - ;; - *) - echo " WARNING: Action $2 not found" >&2 - ;; - esac - + echo " WARNING: Action $2 not found" >&2 return ;; actions) diff --git a/Shorewall/Actions/action.Limit b/Shorewall/Actions/action.Limit new file mode 100644 index 000000000..100adce13 --- /dev/null +++ b/Shorewall/Actions/action.Limit @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.Limit +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Limit(,,) +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.allowBcast b/Shorewall/Actions/action.allowBcast new file mode 100644 index 000000000..b40c9ee1c --- /dev/null +++ b/Shorewall/Actions/action.allowBcast @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.allowBcast +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# allowBcast[([audit])] +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.allowMcast b/Shorewall/Actions/action.allowMcast new file mode 100644 index 000000000..2dd33adc6 --- /dev/null +++ b/Shorewall/Actions/action.allowMcast @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.allowMcast +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# allowMcast[([audit])] +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.allowUPnP b/Shorewall/Actions/action.allowUPnP new file mode 100644 index 000000000..33a14a52e --- /dev/null +++ b/Shorewall/Actions/action.allowUPnP @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.allowUPnP +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# allowUPnP[([audit])] +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.dropBcast b/Shorewall/Actions/action.dropBcast new file mode 100644 index 000000000..e48804127 --- /dev/null +++ b/Shorewall/Actions/action.dropBcast @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.dropBcast +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# dropBcast[([audit])] +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.dropMcast b/Shorewall/Actions/action.dropMcast new file mode 100644 index 000000000..8d0d4a892 --- /dev/null +++ b/Shorewall/Actions/action.dropMcast @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.dropMcast +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# dropMcast[([audit])] +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.dropNotSyn b/Shorewall/Actions/action.dropNotSyn new file mode 100644 index 000000000..863946150 --- /dev/null +++ b/Shorewall/Actions/action.dropNotSyn @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.dropNotSyn +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# dropNotSyn[([audit])] +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.forwardUPnP b/Shorewall/Actions/action.forwardUPnP new file mode 100644 index 000000000..a36325ed8 --- /dev/null +++ b/Shorewall/Actions/action.forwardUPnP @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.forwardUPnP +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# forwardUPnP +# +# This is a built-in action. +# +############################################################################### diff --git a/Shorewall/Actions/action.rejNotSyn b/Shorewall/Actions/action.rejNotSyn new file mode 100644 index 000000000..625e3c1d3 --- /dev/null +++ b/Shorewall/Actions/action.rejNotSyn @@ -0,0 +1,27 @@ +# +# Shorewall -- /usr/share/shorewall/action.rejNotSyn +# +# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt] +# +# (c) 2017 Tom Eastep (teastep@shorewall.net) +# +# Complete documentation is available at http://shorewall.net +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of Version 2 of the GNU General Public License +# as published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# rejNotSyn[([audit])] +# +# This is a built-in action. +# +###############################################################################