2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-21 13:23:02 +01:00
This commit is contained in:
kev
2015-06-28 11:12:07 +08:00
parent 8b438ec6ef
commit a82f530d40
5 changed files with 31 additions and 17 deletions

View File

@@ -1,20 +1,18 @@
#
# Dockerfile for pptpd
#
# WARNING: I ONLY WORKS IN NET:HOST MODE
#
FROM debian:jessie
MAINTAINER kev<noreply@datageek.info>
RUN apt-get update \
&& apt-get install -y iptables pptpd \
&& apt-get install -y pptpd \
&& rm -rf /var/lib/apt/lists/*
COPY pptpd.conf /etc/
COPY chap-secrets /etc/ppp/
COPY options.pptp /etc/ppp/
EXPOSE 1723
CMD iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE \
&& pptpd --fg
COPY pptpd-options /etc/ppp/
CMD ["pptpd", "--fg"]

View File

@@ -11,13 +11,22 @@ pptpd:
image: vimagick/pptpd
volumes:
- ./pptpd.conf:/etc/pptpd.conf
- ./options.pptp:/etc/ppp/options.pptp
- ./pptpd-options:/etc/ppp/pptpd-options
- ./chap-secrets:/etc/ppp/chap-secrets
net: host
privileged: true
restart: always
```
## server
```
$ 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:
- To allow PPTP tunnel maintenance traffic, open `1723/tcp`.

View File

@@ -1,7 +0,0 @@
lock
auth
+chap
name datageek
proxyarp
ms-dns 8.8.8.8
ms-dns 8.8.4.4

15
pptpd/pptpd-options Normal file
View File

@@ -0,0 +1,15 @@
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
nodefaultroute
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4

View File

@@ -1,5 +1,4 @@
speed 115200
option /etc/ppp/options.pptp
pidfile /var/run/pptpd.pid
localip 192.168.127.1
remoteip 192.168.127.100-199
pidfile /var/run/pptpd.pid