1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-27 02:09:06 +02:00
dockerfiles/pptpd/README.md

98 lines
1.9 KiB
Markdown
Raw Normal View History

2015-06-27 12:32:24 +02:00
pptpd
=====
2016-06-28 11:28:49 +02:00
![](https://badge.imagelayers.io/vimagick/pptpd:latest.svg)
2015-06-28 11:14:56 +02:00
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.
2016-06-28 11:28:49 +02:00
## Directory Tree
2015-06-28 11:28:32 +02:00
```
~/fig/pptpd/
├── docker-compose.yml
2018-03-15 16:01:36 +02:00
└── data/
├── pptpd.conf
├── pptpd-options
└── chap-secrets
2015-06-28 11:28:32 +02:00
```
file: docker-compose.yml
2015-06-27 13:33:27 +02:00
2016-06-28 11:28:49 +02:00
```yaml
2015-06-27 13:33:27 +02:00
pptpd:
image: vimagick/pptpd
volumes:
2018-03-15 16:01:36 +02:00
- ./data/pptpd.conf:/etc/pptpd.conf
- ./data/pptpd-options:/etc/ppp/pptpd-options
- ./data/chap-secrets:/etc/ppp/chap-secrets
2015-06-27 13:33:27 +02:00
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 *
```
2016-07-08 14:46:26 +02:00
> Please use strong password in `chap-secrets` file to protect your server.
2015-06-28 11:28:32 +02:00
2016-06-28 11:28:49 +02:00
## Server Setup
2015-06-28 05:12:07 +02:00
2016-06-28 11:28:49 +02:00
```bash
2018-03-15 16:01:36 +02:00
# edit /etc/default/ufw (for ubuntu)
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
2016-06-28 11:28:49 +02:00
$ docker-compose logs -f
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 `DEFAULT_FORWARD_POLICY=ACCEPT`
2016-06-28 11:28:49 +02:00
- Set `net.ipv4.ip_forward=1` (sysctl)
## Client Setup
Connect PPTP server using `username:password` with `mschap-v2/mppe-128` encyption.
2015-06-28 11:28:32 +02:00
2016-06-28 11:28:49 +02:00
## References
2015-06-28 11:28:32 +02:00
2016-06-28 11:28:49 +02:00
- <https://wiki.archlinux.org/index.php/PPTP_server>
- <https://wiki.archlinux.org/index.php/PPTP_Client>