"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "share/arno-iptables-firewall/plugins/20parasitic-net.plugin" between
aif-2.1.0.tar.gz and aif-2.1.1.tar.gz

About: Arno’s iptables firewall is a stateful firewall script for both single and multi-homed machines with DSL/ADSL support.

20parasitic-net.plugin  (aif-2.1.0):20parasitic-net.plugin  (aif-2.1.1)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# -= Arno's Iptables Firewall(AIF) - Parasitic (SNAT) Network plugin =- # -= Arno's Iptables Firewall(AIF) - Parasitic (SNAT) Network plugin =-
# #
PLUGIN_NAME="Parasitic (SNAT) Network plugin" PLUGIN_NAME="Parasitic (SNAT) Network plugin"
PLUGIN_VERSION="1.00" PLUGIN_VERSION="1.01"
PLUGIN_CONF_FILE="parasitic-net.conf" PLUGIN_CONF_FILE="parasitic-net.conf"
# #
# Last changed : May 9, 2019 # Last changed : Jan 16, 2020
# Requirements : AIF 2.1.0 (or newer) # Requirements : AIF 2.1.1 (or newer)
# Comments : This plugin allows "clients" on the same subnet to use this # Comments : This plugin allows "clients" on the same subnet to use this
# device as a gateway upstream. This network of "clients " is # device as a gateway upstream. This network of "clients " is
# SNAT'ed to this device's external interface(s). # SNAT'ed to this device's external interface(s).
# This parasitic network is useful for situations when t he # This parasitic network is useful for situations when t he
# upstream firewall is not under your control and you de sire # upstream firewall is not under your control and you de sire
# added security for specific devices in your subnet. # added security for specific devices in your subnet.
# Set the gateway address of parasitic network clients t o an # Set the gateway address of parasitic network clients t o an
# external IPv4 address of this device. Note that this p lugin # external IPv4 address of this device. Note that this p lugin
# only works for IPv4, NOT IPv6 # only works for IPv4, NOT IPv6
# #
# Author : (C) Copyright 2017-2019 by Arno van Amersfoort & Lonni e Abelbeck # Author : (C) Copyright 2017-2020 by Arno van Amersfoort & Lonni e Abelbeck
# Homepage : https://rocky.eld.leidenuniv.nl/ # Homepage : https://rocky.eld.leidenuniv.nl/
# Email : a r n o v a AT r o c k y DOT e l d DOT l e i d e n u n i v DOT n l # Email : a r n o v a AT r o c k y DOT e l d DOT l e i d e n u n i v DOT n l
# (note: you must remove all spaces and substitute the @ and the . # (note: you must remove all spaces and substitute the @ and the .
# at the proper locations!) # at the proper locations!)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation. # version 2 as published by the Free Software Foundation.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
skipping to change at line 224 skipping to change at line 224
IFS=' ,' IFS=' ,'
for if1 in $INT_IF $DMZ_IF; do for if1 in $INT_IF $DMZ_IF; do
for if2 in $PARASITIC_NET_IF; do for if2 in $PARASITIC_NET_IF; do
if [ "$if1" = "$if2" ]; then if [ "$if1" = "$if2" ]; then
printf "\033[40m\033[1;31m${INDENT}ERROR: INT_IF/DMZ_IF interface $if1 i s not allowed as PARASITIC_NET_IF interface $if2.\033[0m\n" >&2 printf "\033[40m\033[1;31m${INDENT}ERROR: INT_IF/DMZ_IF interface $if1 i s not allowed as PARASITIC_NET_IF interface $if2.\033[0m\n" >&2
return 1 return 1
fi fi
done done
done done
if [ -z "$JOB_HELPER_SCRIPT" -o ! -e "$JOB_HELPER_SCRIPT" ]; then if [ ! -f "$JOB_HELPER_SCRIPT" ]; then
printf "\033[40m\033[1;31m${INDENT}ERROR: The job helper script($JOB_HELPER_ SCRIPT) can not be found!\033[0m\n" >&2 printf "\033[40m\033[1;31m${INDENT}ERROR: The job helper script($JOB_HELPER_ SCRIPT) can not be found!\033[0m\n" >&2
return 1 return 1
fi fi
return 0 return 0
} }
############ ############
# Mainline # # Mainline #
############ ############
skipping to change at line 246 skipping to change at line 246
# Check where to find the config file # Check where to find the config file
CONF_FILE="" CONF_FILE=""
if [ -n "$PLUGIN_CONF_PATH" ]; then if [ -n "$PLUGIN_CONF_PATH" ]; then
CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE"
fi fi
# Preinit to success: # Preinit to success:
PLUGIN_RET_VAL=0 PLUGIN_RET_VAL=0
# Check if the config file exists # Check if the config file exists
if [ ! -e "$CONF_FILE" ]; then if [ ! -f "$CONF_FILE" ]; then
printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_ NAME v$PLUGIN_VERSION\" ignored!\n" >&2 printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_ NAME v$PLUGIN_VERSION\" ignored!\n" >&2
else else
# Source the plugin config file # Source the plugin config file
. "$CONF_FILE" . "$CONF_FILE"
if [ "$ENABLED" = "1" -a "$PLUGIN_CMD" != "stop-restart" ] || if [ "$ENABLED" = "1" -a "$PLUGIN_CMD" != "stop-restart" ] ||
[ "$ENABLED" = "0" -a "$PLUGIN_CMD" = "stop-restart" ] || [ "$ENABLED" = "0" -a "$PLUGIN_CMD" = "stop-restart" ] ||
[ -n "$PLUGIN_LOAD_FILE" -a "$PLUGIN_CMD" = "stop" ] || [ -n "$PLUGIN_LOAD_FILE" -a "$PLUGIN_CMD" = "stop" ] ||
[ -n "$PLUGIN_LOAD_FILE" -a "$PLUGIN_CMD" = "status" ]; then [ -n "$PLUGIN_LOAD_FILE" -a "$PLUGIN_CMD" = "status" ]; then
# Show who we are: # Show who we are:
 End of changes. 5 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)