From 7fb644d3e7e02d57bdaa3028622d7cdf47ef1601 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Mon, 25 Nov 2019 17:06:57 +0100 Subject: [PATCH] Initial commit. --- Dockerfile | 11 +++++++++++ options.l2tpd | 12 ++++++++++++ route.sh | 4 ++++ xl2tpd.conf | 12 ++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 Dockerfile create mode 100644 options.l2tpd create mode 100644 route.sh create mode 100644 xl2tpd.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c14c73b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:buster +MAINTAINER yohan <783b8c87@scimetis.net> +ENV DEBIAN_FRONTEND noninteractive +ENV TZ Europe/Paris +RUN apt-get update && apt-get -y install xl2tpd +COPY xl2tpd.conf /etc/xl2tpd/ +COPY options.l2tpd /etc/ppp/ +COPY route.sh /etc/ppp/ip-pre-up +RUN chmod +x /etc/ppp/ip-pre-up +RUN mkdir -p /var/run/xl2tpd/ +ENTRYPOINT ["/usr/sbin/xl2tpd", "-D"] diff --git a/options.l2tpd b/options.l2tpd new file mode 100644 index 0000000..24a6546 --- /dev/null +++ b/options.l2tpd @@ -0,0 +1,12 @@ +ipcp-accept-local +ipcp-accept-remote +noccp +noauth +idle 1800 +mtu 1410 +mru 1410 +nodefaultroute +usepeerdns +debug +connect-delay 5000 +logfile /dev/stdout diff --git a/route.sh b/route.sh new file mode 100644 index 0000000..12e1e7b --- /dev/null +++ b/route.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +ip route change default via 172.31.1.2 +ip route add 192.168.1.0/24 via 172.31.1.1 dev eth0 diff --git a/xl2tpd.conf b/xl2tpd.conf new file mode 100644 index 0000000..da54f1a --- /dev/null +++ b/xl2tpd.conf @@ -0,0 +1,12 @@ +[global] +access control = no + +[lac test] +lns = 192.168.1.1 +require authentication = no +name = LinuxVPNserver +ppp debug = yes +length bit = yes +redial = yes +autodial = yes +pppoptfile = /etc/ppp/options.l2tpd ; ppp options file for this lac