2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2026-01-03 19:44:58 +01:00
This commit is contained in:
kev
2016-06-30 14:19:43 +08:00
parent de93e5a397
commit ba027d41a3
6 changed files with 96 additions and 0 deletions

28
pptp/docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
cat > /etc/ppp/peers/${TUNNEL} <<_EOF_
pty "pptp ${SERVER} --nolaunchpppd"
name "${USERNAME}"
password "${PASSWORD}"
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam "${TUNNEL}"
_EOF_
cat > /etc/ppp/ip-up.d/9999routes <<_EOF_
#!/bin/bash
ip route add 0.0.0.0/1 dev \$1
ip route add 128.0.0.0/1 dev \$1
_EOF_
cat > /etc/ppp/ip-down.d/9999routes <<_EOF_
#!/bin/bash
ip route del 0.0.0.0/1 dev \$1
ip route del 128.0.0.0/1 dev \$1
_EOF_
chmod +x /etc/ppp/ip-up.d/9999routes
chmod +x /etc/ppp/ip-down.d/9999routes
exec pon ${TUNNEL} debug dump logfd 2 nodetach persist "$@"