Git Product home page Git Product logo

docker-pptpd's Introduction

FOSSA Status

VPN (PPTP) server for Docker

This is a Docker image with VPN (PPTP) server with chap-secrets authentication.

PPTP uses /etc/ppp/chap-secrets file to authenticate VPN users.

Example of chap-secrets file:

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

Starting VPN server

Usage

To start VPN server as a Docker container run:

docker run -d --cap-add=NET_ADMIN --device=/dev/ppp --net=host -v pptpd:/etc/ppp/ --name=pptpd difeid/pptpd

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.

You can edit options.pptp file for modify pptpd configuration. When modifying configuration, you need to restart container.

If you have fails, please try run the Docker container with --privileged

Simple usage

docker run -d --cap-add=NET_ADMIN --device=/dev/ppp --net=host -e USER={your user} -e PASS={your pass} difeid/pptpd

Internet access

To access from the container to the Internet you need to enable IP forwarding on host system. You can try to get Docker to do this by adding the following command line option

--sysctl net.ipv4.conf.all.forwarding=1

And don't forget to configure your firewall.

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.

Environment variables

  • USER, PASS - create USER with PASSword
  • SUBNET - interface ppp0 inet addr. Default: 172.20.10.0/24
  • LOCAL_IP - pptpd local IP address. Default: 172.20.10.1
  • REMOTE_IP - pptpd remote IP address ranges. Default: 172.20.10.100-199

Troubleshooting

In case of permission denied inside container, you can try to start container with --privileged key.

docker-pptpd's People

Contributors

difeid avatar pszalko avatar samos123 avatar syanyong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.