openvpn.sh: Split in to smaller scripts

* Split soon to be massive wrapper into smaller managable scripts.
* Re-organized Dockerfile to exploit cache when rebuilding
This commit is contained in:
Kyle Manna
2014-06-04 11:13:59 -07:00
parent 035ff64200
commit 1869cd85d0
7 changed files with 169 additions and 156 deletions

16
bin/ovpn_run Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
#
# Run the OpenVPN server normally
#
set -ex
mkdir -p /dev/net
if [ ! -c /dev/net/tun ]; then
mknod /dev/net/tun c 10 200
fi
iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -o eth0 -j MASQUERADE
openvpn --config "$OPENVPN/udp1194.conf"