Created
April 22, 2016 13:38
-
-
Save pefoley2/2f5f721225023a9f3134a4b4664955ea to your computer and use it in GitHub Desktop.
netns
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/bash | |
case $script_type in | |
up) | |
ip netns add vpn | |
ip link set dev "$1" up netns vpn mtu "$2" | |
ip netns exec vpn ip link set dev lo up | |
ip netns exec vpn ip addr add dev "$1" local "$4" peer "$5" | |
;; | |
route-up) | |
ip netns exec vpn ip route add default via "$route_vpn_gateway" | |
;; | |
down) | |
ip netns delete vpn | |
;; | |
esac |
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
client | |
dev tun | |
proto udp | |
remote us-east.privateinternetaccess.com 1194 | |
resolv-retry infinite | |
nobind | |
persist-key | |
persist-tun | |
ca /etc/openvpn/ca.crt | |
tls-client | |
remote-cert-tls server | |
auth-user-pass /etc/openvpn/pass.key | |
comp-lzo | |
verb 4 | |
mute 5 | |
reneg-sec 0 | |
crl-verify /etc/openvpn/crl.pem | |
syslog | |
route-noexec | |
ifconfig-noexec | |
up /etc/openvpn/pia.sh | |
down /etc/openvpn/pia.sh | |
route-up /etc/openvpn/pia.sh | |
script-security 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment