1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-28 09:41:20 +00:00
dockerfiles/pptpd/README.md

98 lines
1.9 KiB
Markdown
Raw Normal View History

2015-06-27 10:32:24 +00:00
pptpd
=====
2016-06-28 09:28:49 +00:00
![](https://badge.imagelayers.io/vimagick/pptpd:latest.svg)
2015-06-28 09:14:56 +00:00
2015-06-28 07:25:12 +00:00
The Point-to-Point Tunneling Protocol is a method for implementing virtual private networks.
2015-06-28 09:28:32 +00:00
`PPTP` uses a control channel over TCP and a GRE tunnel operating to encapsulate PPP packets.
2016-06-28 09:28:49 +00:00
## Directory Tree
2015-06-28 09:28:32 +00:00
```
~/fig/pptpd/
├── docker-compose.yml
2018-03-15 14:01:36 +00:00
└── data/
├── pptpd.conf
├── pptpd-options
└── chap-secrets
2015-06-28 09:28:32 +00:00
```
file: docker-compose.yml
2015-06-27 11:33:27 +00:00
2016-06-28 09:28:49 +00:00
```yaml
2015-06-27 11:33:27 +00:00
pptpd:
image: vimagick/pptpd
volumes:
2018-03-15 14:01:36 +00:00
- ./data/pptpd.conf:/etc/pptpd.conf
- ./data/pptpd-options:/etc/ppp/pptpd-options
- ./data/chap-secrets:/etc/ppp/chap-secrets
2015-06-27 11:33:27 +00:00
privileged: true
restart: always
```
2015-06-28 09:28:32 +00: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 12:46:26 +00:00
> Please use strong password in `chap-secrets` file to protect your server.
2015-06-28 09:28:32 +00:00
2016-06-28 09:28:49 +00:00
## Server Setup
2015-06-28 03:12:07 +00:00
2016-06-28 09:28:49 +00:00
```bash
2018-03-15 14:01:36 +00:00
# edit /etc/default/ufw (for ubuntu)
2015-06-28 07:25:12 +00:00
$ modprobe nf_conntrack_pptp nf_nat_pptp
2015-06-28 09:28:32 +00:00
$ cd ~/fig/pptpd/
2015-06-28 03:12:07 +00:00
$ docker-compose up -d
2016-06-28 09:28:49 +00:00
$ docker-compose logs -f
2015-06-28 03:12:07 +00:00
```
2015-06-28 07:25:12 +00:00
You need to config firewall:
2015-06-28 06:48:50 +00:00
2015-06-28 07:25:12 +00: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 09:28:49 +00: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 09:28:32 +00:00
2016-06-28 09:28:49 +00:00
## References
2015-06-28 09:28:32 +00:00
2016-06-28 09:28:49 +00:00
- <https://wiki.archlinux.org/index.php/PPTP_server>
- <https://wiki.archlinux.org/index.php/PPTP_Client>