Today tried docker take a moment pptpd server, feeling fresh lot (of course, after it stepped pit), hereby record.
Use a mirror :
mmontagna/docker-vpn-pptp
As the mirror is ready, so we only need to configure it can be.
Here, since I am using pptpd server, you need to edit the / etc / ppp / chap-secrets file (if not, create it).
Add the following:
# Secrets for authentication using PAP
# client server secret acceptable local IP addresses
username * password *
PS: username and password to add based on the actual situation, this is the secret account when you log in vpn.
PS ++: server where you can also fill pptpd, anyway, to ensure the connection, use pptpd service just fine. as follows:
# Secrets for authentication using PAP
# client server secret acceptable local IP addresses
username pptpd password *
Then, run the following code:
docker run -ti --name my_vpn \
--net=host --privileged \
-p 1723:1723 \
-e client=用户名 \
-e server=* \
-e password=用户密码 \
-e acceptable_local_ip_addresses=* \
-v /etc/ppp/chap-secrets:/etc/ppp/chap-secrets \
mmontagna/docker-vpn-pptp
This specifies the parameters required for the container, it can be modified according to the actual situation.
There are two points to note:
- After I review docker hub, the authors did not find added to the list of parameters client and password. After the test, I found the client and password if not two parameters, vpn connections will be very slow, and even Rom. So I suggest that while the / etc / ppp / chap-secrets file mapping into, specify client and password parameters (of course, if multiple users, it is unnecessary for).
- If the host does not map the / etc / ppp / chap-secrets file into the container, then this can only be connected within the network vpn, not even outside the network.
Postscript: big night was awakened by mosquitoes feel really bad [weeping and crying], and quickly catch up on sleep, go to work today ah ~