Repository: mobtitude/docker-vpn-pptp
Branch: master
Commit: 525e1c13ae4c
Files: 6
Total size: 3.9 KB
Directory structure:
gitextract_t2szqfo3/
├── Dockerfile
├── LICENSE
├── README.md
├── entrypoint.sh
└── etc/
├── ppp/
│ └── pptpd-options
└── pptpd.conf
================================================
FILE CONTENTS
================================================
================================================
FILE: Dockerfile
================================================
FROM ubuntu:16.04
MAINTAINER Przemek Szalko <przemek@mobtitude.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y pptpd iptables
COPY ./etc/pptpd.conf /etc/pptpd.conf
COPY ./etc/ppp/pptpd-options /etc/ppp/pptpd-options
COPY entrypoint.sh /entrypoint.sh
RUN chmod 0700 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["pptpd", "--fg"]
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 mobtitude
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# VPN (PPTP) for Docker
This is a docker image with simple VPN (PPTP) server with _chap-secrets_ authentication.
PPTP uses _/etc/ppp/chap-secrets_ file to authenticate VPN users.
You need to create this file on your own and link it to docker when starting a container.
Example of _chap-secrets_ file:
````
# Secrets for authentication using PAP
# client server secret acceptable local IP addresses
username * password *
````
## Starting VPN server
To start VPN server as a docker container run:
````
docker run -d --privileged -p 1723:1723 -v {local_path_to_chap_secrets}:/etc/ppp/chap-secrets mobtitude/vpn-pptp
````
Edit your local _chap-secrets_ file, to add or modify VPN users whenever you need.
When adding new users to _chap-secrets_ file, you don't need to restart Docker container.
## Connecting to VPN service
You can use any VPN (PPTP) client to connect to the service.
To authenticate use credentials provided in _chap-secrets_ file.
## Troubleshooting
### Docker 1.7.x and connection issues
After upgrading from Docker 1.3.0 to Docker 1.7.1 the containers started from image `mobtitude/vpn-pptp` stopped accepting connections to VPN without any reason.
Connections were dropped after timeout.
It looked like Docker deamon didn't forward packets for GRE protocol to container.
One of the possible solutions is to start container with networking mode set to host by adding param `--net=host` to run command:
````
docker run -d --privileged --net=host -v {local_path_to_chap_secrets}:/etc/ppp/chap-secrets mobtitude/vpn-pptp
````
**Note:** Before starting container in `--net=host` mode, please read how networking in `host` mode works in Docker:
https://docs.docker.com/reference/run/#mode-host
================================================
FILE: entrypoint.sh
================================================
#!/bin/sh
set -e
# enable IP forwarding
sysctl -w net.ipv4.ip_forward=1
# configure firewall
iptables -t nat -A POSTROUTING -s 10.99.99.0/24 ! -d 10.99.99.0/24 -j MASQUERADE
iptables -A FORWARD -s 10.99.99.0/24 -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j TCPMSS --set-mss 1356
iptables -A INPUT -i ppp+ -j ACCEPT
iptables -A OUTPUT -o ppp+ -j ACCEPT
iptables -A FORWARD -i ppp+ -j ACCEPT
iptables -A FORWARD -o ppp+ -j ACCEPT
exec "$@"
================================================
FILE: etc/ppp/pptpd-options
================================================
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
# Network and Routing
ms-dns 8.8.8.8
ms-dns 8.8.4.4
proxyarp
nodefaultroute
# Logging
# debug
# dump
# Miscellaneous
lock
nobsdcomp
novj
novjccomp
nologfd
================================================
FILE: etc/pptpd.conf
================================================
option /etc/ppp/pptpd-options
#debug
#stimeout 10
logwtmp
#bcrelay eth1
#delegate
#connections 100
localip 10.99.99.1
remoteip 10.99.99.100-200
gitextract_t2szqfo3/
├── Dockerfile
├── LICENSE
├── README.md
├── entrypoint.sh
└── etc/
├── ppp/
│ └── pptpd-options
└── pptpd.conf
Condensed preview — 6 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4K chars).
[
{
"path": "Dockerfile",
"chars": 369,
"preview": "FROM ubuntu:16.04\nMAINTAINER Przemek Szalko <przemek@mobtitude.com>\n\nENV DEBIAN_FRONTEND noninteractive\nRUN apt-get upda"
},
{
"path": "LICENSE",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 mobtitude\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "README.md",
"chars": 1755,
"preview": "# VPN (PPTP) for Docker\n\nThis is a docker image with simple VPN (PPTP) server with _chap-secrets_ authentication.\n\nPPTP "
},
{
"path": "entrypoint.sh",
"chars": 445,
"preview": "#!/bin/sh\n\nset -e\n\n# enable IP forwarding\nsysctl -w net.ipv4.ip_forward=1\n\n# configure firewall\niptables -t nat -A POSTR"
},
{
"path": "etc/ppp/pptpd-options",
"chars": 241,
"preview": "name pptpd\nrefuse-pap\nrefuse-chap\nrefuse-mschap\nrequire-mschap-v2\nrequire-mppe-128\n\n# Network and Routing\nms-dns 8.8.8.8"
},
{
"path": "etc/pptpd.conf",
"chars": 143,
"preview": "option /etc/ppp/pptpd-options\n#debug\n#stimeout 10\nlogwtmp\n#bcrelay eth1\n#delegate\n#connections 100\nlocalip 10.99.99.1\nre"
}
]
About this extraction
This page contains the full source code of the mobtitude/docker-vpn-pptp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 6 files (3.9 KB), approximately 1.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.