Sign inSign up

wiexon/pptpd

By wiexon

•Updated over 6 years ago

VPN, PPTP Demon (pptpd) for Docker

Image
0

631

wiexon/pptpd repository overview

⁠VPN, PPTP Demon (pptpd) for Docker

This is a docker image with simple Point to Point Tunneling Protocol (PPTP) VPN server with chap-secrets authentication.

PPTP uses /etc/ppp/chap-secrets file to authenticate VPN users. You need to create this file in the host and link it to docker when starting a container or alternatively you can execute interactive terminal and use vim to edit inside the container itself.

⁠Starting the server

Note: Before run this server make sure that the TCP and UDP port 1723 is not using by another program in the host machine!

To start VPN server as a docker container run:

docker run -d --privileged --net=host --name pptpd wiexon/pptpd

Edit your host or container inside chap-secrets file, to add or modify VPN users whenever you need. After modifying the chap-secrets file, you don't need to restart the Docker container.

Learn more: --net=host⁠ and --privileged⁠

⁠Container shell access and editing the configuration files

The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your pptpd container:

docker exec -it pptpd bash

File locations:

/etc/pptpd.conf
/etc/ppp/chap-secrets
/etc/ppp/pptpd-options

Note: Pre installed VIM editor can be used to edit these files!

⁠Starting the server with binding configuration files from host

docker run -d --privileged --net=host --name pptpd \
-v {host_path_to_pptpd.conf}:/etc/pptpd.conf \
-v {host_path_to_chap-secrets}:/etc/ppp/chap-secrets \
-v {host_path_to_pptpd-options}:/etc/pptpd-options \
wiexon/pptpd

Example of pptpd.conf file:

localip 10.99.99.1
remoteip 10.99.99.100-200

Example of chap-secrets file:

# Secrets for authentication using PAP
# client    server      secret      acceptable local IP addresses
username    *           password    *

Example of pptpd-options file:

ms-dns 8.8.8.8
ms-dns 8.8.4.4

⁠Connecting to VPN service

You can use any PPTP VPN client to connect to the service. To authenticate use credentials provided in chap-secrets file.

Default credentials to test:

  • Username: username
  • Password: password

⁠Credit

This image is a small modified version of mobtitude/vpn-pptp⁠

Tag summary

Content type

Image

Digest

Size

84.8 MB

Last updated

over 6 years ago

docker pull wiexon/pptpd