From 6223eaf7ea6bafa0a75a9a926450d9109e60bc1a Mon Sep 17 00:00:00 2001 From: Pietro Ferrari Date: Wed, 12 Nov 2008 13:24:56 +0000 Subject: fix path to the build_vserver script and put open vpn file on their own dir. --- files/openvpn/create_openvpn_interface | 10 ++++++++++ files/openvpn/destroy_openvpn_interface | 9 +++++++++ files/vserver/create_openvpn_interface | 10 ---------- files/vserver/destroy_openvpn_interface | 9 --------- 4 files changed, 19 insertions(+), 19 deletions(-) create mode 100755 files/openvpn/create_openvpn_interface create mode 100755 files/openvpn/destroy_openvpn_interface delete mode 100755 files/vserver/create_openvpn_interface delete mode 100755 files/vserver/destroy_openvpn_interface (limited to 'files') diff --git a/files/openvpn/create_openvpn_interface b/files/openvpn/create_openvpn_interface new file mode 100755 index 0000000..87d9144 --- /dev/null +++ b/files/openvpn/create_openvpn_interface @@ -0,0 +1,10 @@ +#!/bin/bash + +DEV="$1" +SUBNET="$2" + +openvpn --mktun --dev "$DEV" +ip link set dev "$DEV" txqueuelen 100 +ifconfig "$DEV" "$SUBNET".1 pointopoint "$SUBNET".2 mtu 1500 +route add -net "$SUBNET".0 netmask 255.255.255.0 gw "$SUBNET".2 + diff --git a/files/openvpn/destroy_openvpn_interface b/files/openvpn/destroy_openvpn_interface new file mode 100755 index 0000000..aa89ed4 --- /dev/null +++ b/files/openvpn/destroy_openvpn_interface @@ -0,0 +1,9 @@ +#!/bin/bash + +DEV="$1" +SUBNET="$2" + +route del -net "$SUBNET".0 netmask 255.255.255.0 gw "$SUBNET".2 +ifconfig "$DEV" down +openvpn --rmtun --dev "$DEV" + diff --git a/files/vserver/create_openvpn_interface b/files/vserver/create_openvpn_interface deleted file mode 100755 index 87d9144..0000000 --- a/files/vserver/create_openvpn_interface +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -DEV="$1" -SUBNET="$2" - -openvpn --mktun --dev "$DEV" -ip link set dev "$DEV" txqueuelen 100 -ifconfig "$DEV" "$SUBNET".1 pointopoint "$SUBNET".2 mtu 1500 -route add -net "$SUBNET".0 netmask 255.255.255.0 gw "$SUBNET".2 - diff --git a/files/vserver/destroy_openvpn_interface b/files/vserver/destroy_openvpn_interface deleted file mode 100755 index aa89ed4..0000000 --- a/files/vserver/destroy_openvpn_interface +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -DEV="$1" -SUBNET="$2" - -route del -net "$SUBNET".0 netmask 255.255.255.0 gw "$SUBNET".2 -ifconfig "$DEV" down -openvpn --rmtun --dev "$DEV" - -- cgit v1.2.3