Code Monkey home page Code Monkey logo

docker-vpn-pptp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-vpn-pptp's Issues

Connects but No Internet

Hi,
I have done the instruction, the VPN connects successfully but there is no internet.
What should I do ?

cannot run under docker 1.11.1

with -v :/etc/ppp/chap-secrets

error message:
cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/dd6f466f0678dcd2b405fe48a6d718a85d35a417ddfb1e38dd56750c2f8479c7/etc/ppp/chap-secrets

can not conn in windows !

system

root@iZ25shps9rgZ:/home/vpn# uname -a
Linux iZ25shps9rgZ 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

docker

root@iZ25shps9rgZ:/home/vpn# docker -v
Docker version 1.9.1, build a34a1d5

start script

docker run -d --privileged -p 1723:1723 -v /home/vpn/chap-secrets:/etc/ppp/chap-secrets mobtitude/vpn-pptp

syslog

Apr  1 09:49:24 iZ25shps9rgZ kernel: [16067167.019302] device vethe84b165 entered promiscuous mode
Apr  1 09:49:24 iZ25shps9rgZ kernel: [16067167.019666] IPv6: ADDRCONF(NETDEV_UP): vethe84b165: link is not ready
Apr  1 09:49:24 iZ25shps9rgZ kernel: [16067167.192200] IPv6: ADDRCONF(NETDEV_CHANGE): vethe84b165: link becomes ready
Apr  1 09:49:24 iZ25shps9rgZ kernel: [16067167.192223] docker0: port 1(vethe84b165) entered forwarding state
Apr  1 09:49:24 iZ25shps9rgZ kernel: [16067167.192230] docker0: port 1(vethe84b165) entered forwarding state
Apr  1 09:49:39 iZ25shps9rgZ kernel: [16067182.240041] docker0: port 1(vethe84b165) entered forwarding state

conn by windows pptp:

result is

can not conn , the port is close!

how shuould i do , thinks very much!!

can't run docker command from ubuntu 16.04

my os version : Ubuntu 16.04.1 LTS (Xenial Xerus)
docker version: Docker version 1.11.2, build b9f10c9

docker run -d --privileged -p 1723:1723 -v {local_path_to_chap_secrets}:/etc/ppp/chap-secrets mobtitude/vpn-pptp
docker: Error response from daemon: create {local_path_to_chap_secrets}: "{local_path_to_chap_secrets}" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed.
See 'docker run --help'.

any ideas?

Docker error:

Error response from daemon: Cannot start container 7285000a073bf7cc95bc3e9f48c3ecad260df5de0761ba7d39b12d5dee1d4bda: [8] System error: not a directory

I have other docker containers running just fine too.

my config cannot init.

Secrets for authentication using PAP

client server secret acceptable local IP addresses

chenhuan pptpd chenhuan402 *
amy pptpd amy402 *
huanhuan pptpd huanhuan402 *

image is my config file

and command is docker run -it --privileged -p 1723:1723 -v /root/chap-secrets:/etc/ppp/chap-secrets mobtitude/vpn-pptp
cannot connect server.
can you help me?

Docker image build failing

Could you confirm that? I'm trying to build docker image and fails with error:

Setting up pptpd (1.4.0-7ubuntu0.1) ...
Failed to connect to bus: No such file or directory
dpkg: error processing package pptpd (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up tcpd (7.6.q-25) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu17) ...
Errors were encountered while processing:
 pptpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c apt-get update && apt-get install -y iptables pptpd' returned a non-zero code: 100

Docker version:
Docker version 17.05.0-ce, build 89658be

I get a problem when running it

this was the log:

ljy@ruandao:~/docker-vpn-pptp$ docker build -t ruandao/vpn .
Sending build context to Docker daemon 88.58 kB
Step 0 : FROM ubuntu:latest
---> 91e54dfb1179
Step 1 : MAINTAINER Przemek Szalko [email protected]
---> Running in 0e3501e28867
---> 9518a89488f7
Removing intermediate container 0e3501e28867
Step 2 : ENV DEBIAN_FRONTEND noninteractive
---> Running in 0dc86aac5c4e
---> 4075d35009e8
Removing intermediate container 0dc86aac5c4e
Step 3 : RUN apt-get update && apt-get install -y pptpd iptables
---> Running in bc65922086fc
Ign http://archive.ubuntu.com trusty InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Ign http://archive.ubuntu.com trusty-security InRelease
Hit http://archive.ubuntu.com trusty Release.gpg
Get:1 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Get:2 http://archive.ubuntu.com trusty-security Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty Release
Get:3 http://archive.ubuntu.com trusty-updates Release [63.5 kB]
Get:4 http://archive.ubuntu.com trusty-security Release [63.5 kB]
Get:5 http://archive.ubuntu.com trusty/main Sources [1335 kB]
Get:6 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
Get:7 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
Get:8 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
Get:9 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
Get:10 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Get:11 http://archive.ubuntu.com trusty-updates/main Sources [291 kB]
Get:12 http://archive.ubuntu.com trusty-updates/restricted Sources [4521 B]
Get:13 http://archive.ubuntu.com trusty-updates/universe Sources [169 kB]
Get:14 http://archive.ubuntu.com trusty-updates/main amd64 Packages [772 kB]
Get:15 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [22.7 kB]
Get:16 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [404 kB]
Get:17 http://archive.ubuntu.com trusty-security/main Sources [118 kB]
Get:18 http://archive.ubuntu.com trusty-security/restricted Sources [1874 B]
Get:19 http://archive.ubuntu.com trusty-security/universe Sources [34.8 kB]
Get:20 http://archive.ubuntu.com trusty-security/main amd64 Packages [428 kB]
Get:21 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [14.8 kB]
Get:22 http://archive.ubuntu.com trusty-security/universe amd64 Packages [149 kB]
Fetched 21.2 MB in 13s (1594 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
bcrelay libnfnetlink0 libpcap0.8 libwrap0 libxtables10 ppp tcpd
The following NEW packages will be installed:
bcrelay iptables libnfnetlink0 libpcap0.8 libwrap0 libxtables10 ppp pptpd
tcpd
0 upgraded, 9 newly installed, 0 to remove and 1 not upgraded.
Need to get 897 kB of archives.
After this operation, 3655 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libnfnetlink0 amd64 1.0.1-2 [15.0 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main libpcap0.8 amd64 1.5.3-2 [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main libwrap0 amd64 7.6.q-25 [46.2 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main libxtables10 amd64 1.4.21-1ubuntu1 [25.9 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main iptables amd64 1.4.21-1ubuntu1 [261 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty-updates/main ppp amd64 2.4.5-5.1ubuntu2.2 [311 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty/main bcrelay amd64 1.3.4+27+gddb30f8-1ubuntu1 [13.9 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty/main pptpd amd64 1.3.4+27+gddb30f8-1ubuntu1 [91.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ trusty/main tcpd amd64 7.6.q-25 [23.0 kB]
Fetched 897 kB in 6s (143 kB/s)
Selecting previously unselected package libnfnetlink0:amd64.
(Reading database ... 11541 files and directories currently installed.)
Preparing to unpack .../libnfnetlink0_1.0.1-2_amd64.deb ...
Unpacking libnfnetlink0:amd64 (1.0.1-2) ...
Selecting previously unselected package libpcap0.8:amd64.
Preparing to unpack .../libpcap0.8_1.5.3-2_amd64.deb ...
Unpacking libpcap0.8:amd64 (1.5.3-2) ...
Selecting previously unselected package libwrap0:amd64.
Preparing to unpack .../libwrap0_7.6.q-25_amd64.deb ...
Unpacking libwrap0:amd64 (7.6.q-25) ...
Selecting previously unselected package libxtables10.
Preparing to unpack .../libxtables10_1.4.21-1ubuntu1_amd64.deb ...
Unpacking libxtables10 (1.4.21-1ubuntu1) ...
Selecting previously unselected package iptables.
Preparing to unpack .../iptables_1.4.21-1ubuntu1_amd64.deb ...
Unpacking iptables (1.4.21-1ubuntu1) ...
Selecting previously unselected package ppp.
Preparing to unpack .../ppp_2.4.5-5.1ubuntu2.2_amd64.deb ...
Removing any system startup links for /etc/init.d/ppp ...
Unpacking ppp (2.4.5-5.1ubuntu2.2) ...
Selecting previously unselected package bcrelay.
Preparing to unpack .../bcrelay_1.3.4+27+gddb30f8-1ubuntu1_amd64.deb ...
Unpacking bcrelay (1.3.4+27+gddb30f8-1ubuntu1) ...
Selecting previously unselected package pptpd.
Preparing to unpack .../pptpd_1.3.4+27+gddb30f8-1ubuntu1_amd64.deb ...
Unpacking pptpd (1.3.4+27+gddb30f8-1ubuntu1) ...
Selecting previously unselected package tcpd.
Preparing to unpack .../tcpd_7.6.q-25_amd64.deb ...
Unpacking tcpd (7.6.q-25) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libnfnetlink0:amd64 (1.0.1-2) ...
Setting up libpcap0.8:amd64 (1.5.3-2) ...
Setting up libwrap0:amd64 (7.6.q-25) ...
Setting up libxtables10 (1.4.21-1ubuntu1) ...
Setting up iptables (1.4.21-1ubuntu1) ...
Setting up ppp (2.4.5-5.1ubuntu2.2) ...
Setting up bcrelay (1.3.4+27+gddb30f8-1ubuntu1) ...
Setting up tcpd (7.6.q-25) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up pptpd (1.3.4+27+gddb30f8-1ubuntu1) ...

invoke-rc.d: policy-rc.d denied execution of start.    

Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for ureadahead (0.100.0-16) ...
---> 3299c03fcd1f
Removing intermediate container bc65922086fc
Step 4 : COPY ./etc/pptpd.conf /etc/pptpd.conf
---> f26941ceaad2
Removing intermediate container c792fe75d26c
Step 5 : COPY ./etc/ppp/pptpd-options /etc/ppp/pptpd-options
---> e4ab50a48c0b
Removing intermediate container 154301e7a9b6
Step 6 : COPY entrypoint.sh /entrypoint.sh
---> b39b664b48f0
Removing intermediate container 9ce2115d709f
Step 7 : RUN chmod 0700 /entrypoint.sh
---> Running in 7423f7c2d995
---> bc86c74d7934
Removing intermediate container 7423f7c2d995
Step 8 : ENTRYPOINT /entrypoint.sh
---> Running in 9620d5f9705e
---> 9ed928431e7f
Removing intermediate container 9620d5f9705e
Step 9 : CMD pptpd --fg
---> Running in 423a2c9be76c
---> d22d4ea278d3
Removing intermediate container 423a2c9be76c
Successfully built d22d4ea278d3

but when i run it, the system output this error:

ljy@ruandao:~/docker-vpn-pptp$ docker run -d --privileged -p 1723:1723 -v $(pwd)/vpnConf:/etc/ppp/chap-secrets ruandao/vpn
31f93dae5d5edc84389678d720399d4522d9cc19536e845e403c922c29cbbc5b
Error response from daemon: Cannot start container 31f93dae5d5edc84389678d720399d4522d9cc19536e845e403c922c29cbbc5b: [8] System error: not a directory

the docker version:

ljy@ruandao:~/docker-vpn-pptp$ docker version
Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:35:49 UTC 2015
OS/Arch: linux/amd64

Server:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:35:49 UTC 2015
OS/Arch: linux/amd64

thank you!

Perhaps a fix for the host mode only?

https://forums.docker.com/t/solved-incoming-network-traffic-not-forwarding-to-container/43191/6

Then seems to pass GRE for me:

11:42:24.751268 IP 172.17.0.8 > 10.8.11.10: GREv1, call 56583, seq 0, length 41: LCP, Conf-Request (0x01), id 1, length 27
11:42:24.751717 IP 10.8.11.10 > 172.17.0.8: GREv1, call 3840, seq 1, length 36: LCP, Conf-Request (0x01), id 2, length 22
11:42:24.751726 IP 10.8.11.10 > 172.17.0.8: GREv1, call 3840, seq 2, length 41: LCP, Conf-Ack (0x02), id 1, length 27
11:42:24.751892 IP 172.17.0.8 > 10.8.11.10: GREv1, call 56583, seq 1, ack 2, length 28: LCP, Conf-Reject (0x04), id 2, length 10
11:42:24.752141 IP 10.8.11.10 > 172.17.0.8: GREv1, call 3840, seq 3, ack 1, length 36: LCP, Conf-Request (0x01), id 3, length 18
11:42:24.752536 IP 172.17.0.8 > 10.8.11.10: GREv1, call 56583, seq 2, ack 3, length 36: LCP, Conf-Ack (0x02), id 3, length 18
11:42:24.752567 IP 172.17.0.8 > 10.8.11.10: GREv1, call 56583, seq 3, length 24: LCP, Echo-Request (0x09), id 0, length 10
11:42:24.752645 IP 172.17.0.8 > 10.8.11.10: GREv1, call 56583, seq 4, length 48: CHAP, Challenge (0x01), id 87, Value xxxxxx, Name xxxxxx
11:42:24.752903 IP 10.8.11.10 > 172.17.0.8: GREv1, call 3840, seq 4, ack 3, length 28: LCP, Echo-Request (0x09), id 0, length 10
11:42:24.752908 IP 10.8.11.10 > 172.17.0.8: GREv1, call 3840, seq 5, length 24: LCP, Echo-Reply (0x0a), id 0, length 10
11:42:24.752989 IP 172.17.0.8 > 10.8.11.10: GREv1, call 56583, seq 5, ack 4, length 28: LCP, Echo-Reply (0x0a), id 0, length 10
modprobe ip_conntrack_pptp
echo 1 > /proc/sys/net/netfilter/nf_conntrack_helper

iptable filter

I'd like to use iptables to filter some request. but I don't know how to deal with it under docker.
who can show me the rules example? thank you.

How can I use this in our company.

I run the docker container successful, but our company's network is beyond proxy.I could not connect to the ip address of eth1, I mean I also can't ping through.(that may because I'm in China) Could you please give me an advise on how to get accorss our GREAT FIREE WALL?

iptables issue

Hi, I had to add theses rules, otherwise it doesn't works:
iptables -A INPUT -i ppp0 -j ACCEPT
iptables -A OUTPUT -o ppp0 -j ACCEPT
iptables -A FORWARD -i ppp0 -j ACCEPT
iptables -A FORWARD -o ppp0 -j ACCEPT

File to File mounting fails

This mount solution, which actually mounts a file to a file, doesn't work on every filesystem.

Error:
mounting "localpath" to rootfs "dockerpath" caused "not a directory".

host shares the same network with container cant have second container

Hello,

I am trying to create a pptp connection through a base ubuntu image ( docker run -d -it --net=host --name ubuntu2 ubuntu:18.04) and everything works only if i use net=host. The problem that arises is that the host gets to share vpn connection too. Thus i cannot create a second docker in the same host. They conflict with each other. Is there any way i can install in my host (ubuntu 17.10) docker 1.3 that you mentioned cuz it seems old and i can't find anywhere any manual how i can do it. Or how can i isolate the network to be only inside the container? Please let me know cuz it is really important for me. Regards

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.