Last active
August 29, 2015 14:21
-
-
Save aschmoe/c26e0963fa843bc3f049 to your computer and use it in GitHub Desktop.
Openvpn only works the first time...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create up script | |
sudo vi /etc/openvpn/up.sh | |
# Create down script | |
sudo vi /etc/openvpn/down.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BR=$1 | |
DEV=$2 | |
/sbin/brctl delif $BR $DEV | |
/sbin/ip link set "$DEV" down |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BR=$1 | |
DEV=$2 | |
MTU=$3 | |
/sbin/ip link set "$DEV" up promisc on mtu "$MTU" | |
/sbin/brctl addif $BR $DEV | |
Now, we'll create a "down" script. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment