aboutsummaryrefslogtreecommitdiff
path: root/files/openvpn/destroy_openvpn_interface
blob: aa89ed4658dab2a3f8dfd109d76d8e274fc74b65 (plain)
1
2
3
4
5
6
7
8
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"