2015-11-20 13:22:21 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for l2tpd
|
|
|
|
#
|
|
|
|
# - https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_on_a_Raspberry_Pi_with_Arch_Linux.html
|
|
|
|
# - https://github.com/jlund/streisand/tree/master/playbooks/roles/l2tp-ipsec
|
|
|
|
# - https://wiki.openwrt.org/inbox/openswanxl2tpvpn
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM alpine:edge
|
2017-05-08 01:05:07 +02:00
|
|
|
MAINTAINER kev <noreply@easypi.pro>
|
2015-11-20 13:22:21 +02:00
|
|
|
|
|
|
|
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
|
|
|
|
&& apk add -U libreswan xl2tpd ppp \
|
|
|
|
&& ipsec initnss \
|
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
COPY ipsec.conf /etc/ipsec.conf
|
|
|
|
COPY ipsec.secrets /etc/ipsec.secrets
|
|
|
|
COPY options.xl2tpd /etc/ppp/options.xl2tpd
|
|
|
|
COPY chap-secrets /etc/ppp/chap-secrets
|
|
|
|
|
|
|
|
EXPOSE 500/udp 1701/udp 4500/udp
|
|
|
|
|
|
|
|
CMD iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE \
|
|
|
|
&& ipsec _stackmanager start \
|
2015-12-04 14:04:12 +02:00
|
|
|
&& ipsec pluto \
|
2015-11-20 13:22:21 +02:00
|
|
|
&& xl2tpd -D
|
|
|
|
|