diff options
Diffstat (limited to 'files/openvpn/destroy_openvpn_interface')
-rwxr-xr-x | files/openvpn/destroy_openvpn_interface | 9 |
1 files changed, 9 insertions, 0 deletions
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" + |