From: <abe...@us...> - 2016-01-09 17:51:25
|
Revision: 7451 http://sourceforge.net/p/astlinux/code/7451 Author: abelbeck Date: 2016-01-09 17:51:22 +0000 (Sat, 09 Jan 2016) Log Message: ----------- arnofw, add new PPTP VPN Passthrough plugin from upstream Ref: https://github.com/arno-iptables-firewall/aif/commit/ade2e3fd17771b861f97dd3adb5307e4da16dc4e Modified Paths: -------------- branches/1.0/package/arnofw/arnofw.serial Added Paths: ----------- branches/1.0/package/arnofw/arnofw-pptp-vpn-passthrough.patch Added: branches/1.0/package/arnofw/arnofw-pptp-vpn-passthrough.patch =================================================================== --- branches/1.0/package/arnofw/arnofw-pptp-vpn-passthrough.patch (rev 0) +++ branches/1.0/package/arnofw/arnofw-pptp-vpn-passthrough.patch 2016-01-09 17:51:22 UTC (rev 7451) @@ -0,0 +1,186 @@ +From ade2e3fd17771b861f97dd3adb5307e4da16dc4e Mon Sep 17 00:00:00 2001 +From: Lonnie Abelbeck <lo...@ab...> +Date: Sat, 9 Jan 2016 10:04:46 -0600 +Subject: [PATCH] added: PPTP VPN Passthrough plugin, Issue #27 + +--- + .../plugins/pptp-vpn-passthrough.conf | 14 +++ + .../plugins/50pptp-vpn-passthrough.plugin | 135 +++++++++++++++++++++ + .../plugins/pptp-vpn-passthrough.CHANGELOG | 4 + + 3 files changed, 153 insertions(+) + create mode 100644 etc/arno-iptables-firewall/plugins/pptp-vpn-passthrough.conf + create mode 100644 share/arno-iptables-firewall/plugins/50pptp-vpn-passthrough.plugin + create mode 100644 share/arno-iptables-firewall/plugins/pptp-vpn-passthrough.CHANGELOG + +diff --git a/etc/arno-iptables-firewall/plugins/pptp-vpn-passthrough.conf b/etc/arno-iptables-firewall/plugins/pptp-vpn-passthrough.conf +new file mode 100644 +index 0000000..250bc0d +--- /dev/null ++++ b/etc/arno-iptables-firewall/plugins/pptp-vpn-passthrough.conf +@@ -0,0 +1,14 @@ ++# ------------------------------------------------------------------------------ ++# -= Arno's iptables firewall - PPTP VPN Passthrough plugin =- ++# ------------------------------------------------------------------------------ ++ ++# To actually enable this plugin make ENABLED=1: ++# ------------------------------------------------------------------------------ ++ENABLED=0 ++ ++# PPTP uses the GRE protocol for transport, as such, when PPTP VPN clients ++# have NAT between them and the PPTP VPN server special packet handling must be performed. ++# This plugin loads the required Linux Kernel modules to handle that situation. ++# ++# No configuration options ++# ------------------------------------------------------------------------------ +diff --git a/share/arno-iptables-firewall/plugins/50pptp-vpn-passthrough.plugin b/share/arno-iptables-firewall/plugins/50pptp-vpn-passthrough.plugin +new file mode 100644 +index 0000000..379a1dd +--- /dev/null ++++ b/share/arno-iptables-firewall/plugins/50pptp-vpn-passthrough.plugin +@@ -0,0 +1,135 @@ ++# ------------------------------------------------------------------------------ ++# -= Arno's iptables firewall - PPTP VPN Passthrough plugin =- ++# ++PLUGIN_NAME="PPTP VPN Passthrough plugin" ++PLUGIN_VERSION="1.00" ++PLUGIN_CONF_FILE="pptp-vpn-passthrough.conf" ++# ++# Last changed : January 9, 2016 ++# Requirements : AIF 2.0.0+ and ip_nat_pptp ++# Comments : This plugin loads the required kernel modules for PPTP VPN Clients ++# to access remote PPTP VPN Server(s) when NAT is enabled. ++# ++# Author : (C) Copyright 2016 by Lonnie Abelbeck & Arno van Amersfoort ++# Homepage : http://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 ++# (note: you must remove all spaces and substitute the @ and the . ++# at the proper locations!) ++# ------------------------------------------------------------------------------ ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License ++# version 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# ------------------------------------------------------------------------------ ++ ++# Plugin start function ++plugin_start() ++{ ++ ++ if [ "$NAT" = "1" ]; then ++ echo "${INDENT}Enable PPTP NAT helper module" ++ modprobe_multi nf_nat_pptp ip_nat_pptp ++ else ++ echo "${INDENT}ERROR: NAT is not enabled, this plugin will be ignored." ++ fi ++ ++ return 0 ++} ++ ++ ++# Plugin restart function ++plugin_restart() ++{ ++ ++ # Skip plugin_stop on a restart ++ plugin_start ++ ++ return 0 ++} ++ ++ ++# Plugin stop function ++plugin_stop() ++{ ++ ++ if [ "$NAT" = "1" ]; then ++ if [ -e /proc/modules -a -x "$MODPROBE" ]; then ++ if ! $MODPROBE -r nf_nat_pptp >/dev/null 2>&1; then ++ $MODPROBE -r ip_nat_pptp >/dev/null 2>&1 ++ fi ++ if [ $? -eq 0 ]; then ++ echo "${INDENT}Disabled PPTP NAT helper module" ++ fi ++ fi ++ fi ++ ++ return 0 ++} ++ ++ ++# Plugin status function ++plugin_status() ++{ ++ return 0 ++} ++ ++ ++# Check sanity of eg. environment ++plugin_sanity_check() ++{ ++ return 0 ++} ++ ++ ++############ ++# Mainline # ++############ ++ ++# Check where to find the config file ++CONF_FILE="" ++if [ -n "$PLUGIN_CONF_PATH" ]; then ++ CONF_FILE="$PLUGIN_CONF_PATH/$PLUGIN_CONF_FILE" ++fi ++ ++# Preinit to success: ++PLUGIN_RET_VAL=0 ++ ++# Check if the config file exists ++if [ ! -e "$CONF_FILE" ]; then ++ printf "NOTE: Config file \"$CONF_FILE\" not found!\n Plugin \"$PLUGIN_NAME v$PLUGIN_VERSION\" ignored!\n" >&2 ++else ++ # Source the plugin config file ++ . "$CONF_FILE" ++ ++ if [ "$ENABLED" = "1" -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" = "status" ]; then ++ # Show who we are: ++ echo "${INDENT}$PLUGIN_NAME v$PLUGIN_VERSION" ++ ++ # Increment indention ++ INDENT="$INDENT " ++ ++ # Only proceed if environment ok ++ if ! plugin_sanity_check; then ++ PLUGIN_RET_VAL=1 ++ else ++ case $PLUGIN_CMD in ++ start|'') plugin_start; PLUGIN_RET_VAL=$? ;; ++ restart ) plugin_restart; PLUGIN_RET_VAL=$? ;; ++ stop|stop-restart) plugin_stop; PLUGIN_RET_VAL=$? ;; ++ status ) plugin_status; PLUGIN_RET_VAL=$? ;; ++ * ) PLUGIN_RET_VAL=1; printf "\033[40m\033[1;31m${INDENT}ERROR: Invalid plugin option \"$PLUGIN_CMD\"!\033[0m\n" >&2 ;; ++ esac ++ fi ++ fi ++fi +diff --git a/share/arno-iptables-firewall/plugins/pptp-vpn-passthrough.CHANGELOG b/share/arno-iptables-firewall/plugins/pptp-vpn-passthrough.CHANGELOG +new file mode 100644 +index 0000000..042b789 +--- /dev/null ++++ b/share/arno-iptables-firewall/plugins/pptp-vpn-passthrough.CHANGELOG +@@ -0,0 +1,4 @@ ++Version 1.00 (January 9, 2016) ++----------------------------------- +++ Initial version ++ + Modified: branches/1.0/package/arnofw/arnofw.serial =================================================================== --- branches/1.0/package/arnofw/arnofw.serial 2016-01-09 15:16:38 UTC (rev 7450) +++ branches/1.0/package/arnofw/arnofw.serial 2016-01-09 17:51:22 UTC (rev 7451) @@ -1 +1 @@ -0002~0025~0000~0000~0000~ +0002~0026~0000~0000~0000~ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |