1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/ocserv/docker-entrypoint.sh
2017-09-01 19:42:28 +08:00

14 lines
268 B
Bash
Executable File

#!/bin/sh
/init.sh
if [ ! -e /dev/net/tun ]; then
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 600 /dev/net/tun
fi
iptables -t nat -A POSTROUTING -s ${VPN_NETWORK}/${VPN_NETMASK} -j MASQUERADE
exec ocserv -c /etc/ocserv/ocserv.conf -f -d 1 "$@"