1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00
dockerfiles/l2tpd/Dockerfile

29 lines
807 B
Docker
Raw Normal View History

2015-11-20 11:22:21 +00: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-07 23:05:07 +00:00
MAINTAINER kev <noreply@easypi.pro>
2015-11-20 11:22:21 +00: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 12:04:12 +00:00
&& ipsec pluto \
2015-11-20 11:22:21 +00:00
&& xl2tpd -D