1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
This commit is contained in:
kev 2015-06-28 11:53:23 +08:00
parent 2addd13eef
commit a6318a3242
3 changed files with 7 additions and 12 deletions

View File

@ -1,8 +1,6 @@
# #
# Dockerfile for pptpd # Dockerfile for pptpd
# #
# WARNING: I ONLY WORKS IN NET:HOST MODE
#
FROM debian:jessie FROM debian:jessie
MAINTAINER kev<noreply@datageek.info> MAINTAINER kev<noreply@datageek.info>
@ -15,4 +13,5 @@ COPY pptpd.conf /etc/
COPY chap-secrets /etc/ppp/ COPY chap-secrets /etc/ppp/
COPY pptpd-options /etc/ppp/ COPY pptpd-options /etc/ppp/
CMD ["pptpd", "--fg"] CMD iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE \
&& pptpd --fg

View File

@ -13,7 +13,6 @@ pptpd:
- ./pptpd.conf:/etc/pptpd.conf - ./pptpd.conf:/etc/pptpd.conf
- ./pptpd-options:/etc/ppp/pptpd-options - ./pptpd-options:/etc/ppp/pptpd-options
- ./chap-secrets:/etc/ppp/chap-secrets - ./chap-secrets:/etc/ppp/chap-secrets
net: host
privileged: true privileged: true
restart: always restart: always
``` ```
@ -22,9 +21,6 @@ pptpd:
``` ```
$ docker-compose up -d $ docker-compose up -d
$ iptables -t filter -I INPUT -p tcp --dport 1723 -j ACCEPT
$ iptables -t filter -I INPUT -p 47 -j ACCEPT
$ iptables -t nat -I POSTROUTING -s 192.168.127.0/24 -j MASQUERADE
``` ```
You must open the following ports: You must open the following ports:

View File

@ -1,9 +1,9 @@
name pptpd name pptpd
refuse-pap #refuse-pap
refuse-chap #refuse-chap
refuse-mschap #refuse-mschap
require-mschap-v2 #require-mschap-v2
require-mppe-128 #require-mppe-128
proxyarp proxyarp
nodefaultroute nodefaultroute
lock lock