2015-06-27 12:32:24 +02:00
|
|
|
pptpd
|
|
|
|
=====
|
|
|
|
|
2015-06-28 11:14:56 +02:00
|
|
|
[![](https://badge.imagelayers.io/vimagick/pptpd:latest.svg)](https://imagelayers.io/?images=vimagick/pptpd:latest)
|
|
|
|
|
2015-06-28 09:25:12 +02:00
|
|
|
The Point-to-Point Tunneling Protocol is a method for implementing virtual private networks.
|
|
|
|
|
2015-06-28 11:28:32 +02:00
|
|
|
`PPTP` uses a control channel over TCP and a GRE tunnel operating to encapsulate PPP packets.
|
|
|
|
|
|
|
|
## directory tree
|
|
|
|
|
|
|
|
```
|
|
|
|
~/fig/pptpd/
|
|
|
|
├── docker-compose.yml
|
|
|
|
├── pptpd.conf
|
|
|
|
├── pptpd-options
|
|
|
|
└── chap-secrets
|
|
|
|
```
|
|
|
|
|
|
|
|
file: docker-compose.yml
|
2015-06-27 13:33:27 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
pptpd:
|
|
|
|
image: vimagick/pptpd
|
|
|
|
volumes:
|
2015-06-28 04:39:46 +02:00
|
|
|
- ./pptpd.conf:/etc/pptpd.conf
|
2015-06-28 05:12:07 +02:00
|
|
|
- ./pptpd-options:/etc/ppp/pptpd-options
|
2015-06-27 13:33:27 +02:00
|
|
|
- ./chap-secrets:/etc/ppp/chap-secrets
|
|
|
|
privileged: true
|
|
|
|
restart: always
|
|
|
|
```
|
|
|
|
|
2015-06-28 11:28:32 +02:00
|
|
|
file: pptpd.conf
|
|
|
|
|
|
|
|
```
|
|
|
|
option /etc/ppp/pptpd-options
|
|
|
|
pidfile /var/run/pptpd.pid
|
|
|
|
localip 192.168.127.1
|
|
|
|
remoteip 192.168.127.100-199
|
|
|
|
```
|
|
|
|
|
|
|
|
file: pptpd-options
|
|
|
|
|
|
|
|
```
|
|
|
|
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
|
|
|
|
```
|
|
|
|
|
|
|
|
file: chap-secrets
|
|
|
|
|
|
|
|
```
|
|
|
|
# Secrets for authentication using CHAP
|
|
|
|
# client server secret IP addresses
|
|
|
|
|
|
|
|
username * password *
|
|
|
|
```
|
|
|
|
|
|
|
|
> Please use strong password in `cha-secrets` file to protect your server.
|
|
|
|
|
2015-06-28 05:12:07 +02:00
|
|
|
## server
|
|
|
|
|
|
|
|
```
|
2015-06-28 09:25:12 +02:00
|
|
|
$ modprobe nf_conntrack_pptp nf_nat_pptp
|
2015-06-28 11:28:32 +02:00
|
|
|
$ cd ~/fig/pptpd/
|
2015-06-28 05:12:07 +02:00
|
|
|
$ docker-compose up -d
|
2015-06-28 11:31:23 +02:00
|
|
|
$ docker-compose logs
|
2015-06-28 05:12:07 +02:00
|
|
|
```
|
|
|
|
|
2015-06-28 09:25:12 +02:00
|
|
|
You need to config firewall:
|
2015-06-28 08:48:50 +02:00
|
|
|
|
2015-06-28 09:25:12 +02:00
|
|
|
- To let PPTP tunnel maintenance traffic, `allow port 1723/tcp`.
|
|
|
|
- To let PPTP tunneled data to pass through router, `allow proto gre`.
|
|
|
|
- Set `net.ipv4.ip_forward=1`
|
|
|
|
- Set `DEFAULT_FORWARD_POLICY=ACCEPT`
|
2015-06-28 11:28:32 +02:00
|
|
|
|
|
|
|
## client
|
|
|
|
|
|
|
|
Connect PPTP server using `username:password` with `mppe-128` encyption.
|