mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-12 04:23:04 +02:00
add pptp
This commit is contained in:
parent
de93e5a397
commit
ba027d41a3
@ -97,6 +97,7 @@ A collection of delicious docker recipes.
|
|||||||
- [x] plex :moneybag:
|
- [x] plex :moneybag:
|
||||||
- [x] polipo
|
- [x] polipo
|
||||||
- [x] portia
|
- [x] portia
|
||||||
|
- [x] pptp
|
||||||
- [x] pptpd
|
- [x] pptpd
|
||||||
- [x] privoxy
|
- [x] privoxy
|
||||||
- [x] privoxy-arm
|
- [x] privoxy-arm
|
||||||
|
@ -6,3 +6,4 @@ openconnect:
|
|||||||
- ./data:/etc/openconnect
|
- ./data:/etc/openconnect
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
privileged: yes
|
privileged: yes
|
||||||
|
restart: unless-stopped
|
||||||
|
15
pptp/Dockerfile
Normal file
15
pptp/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for pptp
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM debian
|
||||||
|
MAINTAINER kev <noreply@easypi.info>
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y iptables pptp-linux \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY docker-entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
41
pptp/README.md
Normal file
41
pptp/README.md
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
pptp
|
||||||
|
====
|
||||||
|
|
||||||
|
Containerized PPTP Client
|
||||||
|
|
||||||
|
## docker-compose.yml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
pptp:
|
||||||
|
image: vimagick/pptp
|
||||||
|
environment:
|
||||||
|
- SERVER=1.2.3.4
|
||||||
|
- TUNNEL=vps
|
||||||
|
- USERNAME=username
|
||||||
|
- PASSWORD=password
|
||||||
|
net: host
|
||||||
|
privileged: yes
|
||||||
|
restart: unless-stopped
|
||||||
|
```
|
||||||
|
|
||||||
|
## up and running
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo modprobe nf_conntrack_pptp nf_conntrack_proto_gre
|
||||||
|
|
||||||
|
docker-compose up -d
|
||||||
|
docker-compose logs -f
|
||||||
|
|
||||||
|
ip link show
|
||||||
|
ip addr show
|
||||||
|
ip route show
|
||||||
|
|
||||||
|
curl ifconfig.co
|
||||||
|
curl ifconfig.ovh
|
||||||
|
curl ifconfig.me
|
||||||
|
```
|
||||||
|
|
||||||
|
## references
|
||||||
|
|
||||||
|
- <http://pptpclient.sourceforge.net/howto-debian.phtml>
|
||||||
|
- <https://wiki.archlinux.org/index.php/PPTP_Client>
|
10
pptp/docker-compose.yml
Normal file
10
pptp/docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
pptp:
|
||||||
|
image: vimagick/pptp
|
||||||
|
environment:
|
||||||
|
- SERVER=192.168.31.222
|
||||||
|
- TUNNEL=vps
|
||||||
|
- USERNAME=username
|
||||||
|
- PASSWORD=password
|
||||||
|
net: host
|
||||||
|
privileged: yes
|
||||||
|
restart: unless-stopped
|
28
pptp/docker-entrypoint.sh
Executable file
28
pptp/docker-entrypoint.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cat > /etc/ppp/peers/${TUNNEL} <<_EOF_
|
||||||
|
pty "pptp ${SERVER} --nolaunchpppd"
|
||||||
|
name "${USERNAME}"
|
||||||
|
password "${PASSWORD}"
|
||||||
|
remotename PPTP
|
||||||
|
require-mppe-128
|
||||||
|
file /etc/ppp/options.pptp
|
||||||
|
ipparam "${TUNNEL}"
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
cat > /etc/ppp/ip-up.d/9999routes <<_EOF_
|
||||||
|
#!/bin/bash
|
||||||
|
ip route add 0.0.0.0/1 dev \$1
|
||||||
|
ip route add 128.0.0.0/1 dev \$1
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
cat > /etc/ppp/ip-down.d/9999routes <<_EOF_
|
||||||
|
#!/bin/bash
|
||||||
|
ip route del 0.0.0.0/1 dev \$1
|
||||||
|
ip route del 128.0.0.0/1 dev \$1
|
||||||
|
_EOF_
|
||||||
|
|
||||||
|
chmod +x /etc/ppp/ip-up.d/9999routes
|
||||||
|
chmod +x /etc/ppp/ip-down.d/9999routes
|
||||||
|
|
||||||
|
exec pon ${TUNNEL} debug dump logfd 2 nodetach persist "$@"
|
Loading…
Reference in New Issue
Block a user