diff --git a/README.md b/README.md index 0b2feee..1fd391e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # xl2tpd +xl2tpd is an implementation of the Layer 2 Tunneling Protocol as defined by RFC 2661. L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP servers. Another important application is Virtual Private Networks where the IPsec protocol is used to secure the L2TP connection (L2TP/IPsec is defined by RFC 3193. xl2tpd can be used in combination with IPsec implementations such as Openswan. Example configuration files for such a setup are included in the examples directory. + diff --git a/options.l2tpd b/options.l2tpd new file mode 100644 index 0000000..3030af4 --- /dev/null +++ b/options.l2tpd @@ -0,0 +1,24 @@ +login +lcp-echo-interval 10 +lcp-echo-failure 2 +noipx + +refuse-pap +refuse-chap +refuse-mschap + +require-mppe +require-mschap-v2 + +nodefaultroute +proxyarp + +#bsdcomp +#deflate +#accomp +#noccp +#nopcomp +#nopredictor1 +#novj +#novjccomp +#debug 7 diff --git a/xl2tpd.conf.client-example b/xl2tpd.conf.client-example new file mode 100644 index 0000000..7420f94 --- /dev/null +++ b/xl2tpd.conf.client-example @@ -0,0 +1,19 @@ +[global] +access control = no +auth file = /etc/ppp/chap-secrets +debug avp = no +debug network = no +debug packet = no +debug state = no +debug tunnel = no + +[lac ] +lns = +redial = yes +redial timeout = 5 +require chap = yes +require authentication = no +ppp debug = no +pppoptfile = /etc/ppp/peers/ +require pap = no +autodial = yes diff --git a/xl2tpd.conf.server-example b/xl2tpd.conf.server-example new file mode 100644 index 0000000..a967a3d --- /dev/null +++ b/xl2tpd.conf.server-example @@ -0,0 +1,21 @@ +[global] +access control = yes +auth file = /etc/ppp/chap-secrets +debug avp = no +debug network = no +debug packet = no +debug state = no +debug tunnel = no + +[lns ] +require chap = yes +ppp debug = no +pppoptfile = /etc/ppp/options.l2tpd +require pap = no +assign ip = yes +hostname = +ip range = +local ip = +challenge = no +lac = +require authentication = no diff --git a/xl2tpd.service b/xl2tpd.service new file mode 100644 index 0000000..a2a51a8 --- /dev/null +++ b/xl2tpd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Level 2 Tunnel Protocol Daemon (L2TP) +After=network.target +After=ipsec.service +# Some ISPs in Russia use l2tp without IPsec, so don't insist anymore +#Wants=ipsec.service + +[Service] +Type=simple +PIDFile=/run/xl2tpd/xl2tpd.pid +ExecStart=/usr/bin/xl2tpd -D +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/xl2tpd.spec b/xl2tpd.spec new file mode 100644 index 0000000..6fc39d4 --- /dev/null +++ b/xl2tpd.spec @@ -0,0 +1,64 @@ +Name: xl2tpd +Version: 1.3.18 +Release: 1mamba +Summary: An implementation of the Layer 2 Tunneling Protocol as defined by RFC 2661 +Group: Network/Security +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/xelerance/xl2tpd +Source: https://github.com/xelerance/xl2tpd.git/v%{version}/xl2tpd-%{version}.tar.bz2 +Source1: xl2tpd.service +Source2: xl2tpd.tmpfiles +Source3: xl2tpd.conf.client-example +Source4: xl2tpd.conf.server-example +Source5: options.l2tpd +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libpcap-devel +## AUTOBUILDREQ-END +Requires: ppp + +%description +xl2tpd is an implementation of the Layer 2 Tunneling Protocol as defined by RFC 2661. L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP servers. Another important application is Virtual Private Networks where the IPsec protocol is used to secure the L2TP connection (L2TP/IPsec is defined by RFC 3193. xl2tpd can be used in combination with IPsec implementations such as Openswan. Example configuration files for such a setup are included in the examples directory. + +%prep +%setup -q + +%build +%make PREFIX=%{_prefix} SBINDIR=%{_bindir} + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall PREFIX=%{_prefix} SBINDIR=%{buildroot}%{_bindir} + +install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/xl2tpd.service +install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/xl2tpd.conf +install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xl2tpd/xl2tpd.conf.client-example +install -D -m0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/xl2tpd/xl2tpd.conf.server-example +install -D -m0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/ppp/options.l2tpd + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/ppp/options.l2tpd +%{_sysconfdir}/xl2tpd/xl2tpd.conf.client-example +%{_sysconfdir}/xl2tpd/xl2tpd.conf.server-example +%{_bindir}/pfc +%{_bindir}/xl2tpd +%{_bindir}/xl2tpd-control +%{_unitdir}/xl2tpd.service +%{_tmpfilesdir}/xl2tpd.conf +%{_mandir}/man1/pfc.1* +%{_mandir}/man5/l2tp-secrets.5* +%{_mandir}/man5/xl2tpd.conf.5* +%{_mandir}/man8/xl2tpd-control.8* +%{_mandir}/man8/xl2tpd.8* +%doc CREDITS LICENSE + +%changelog +* Thu Jan 23 2025 Silvan Calarco 1.3.18-1mamba +- package created using the webbuild interface diff --git a/xl2tpd.tmpfiles b/xl2tpd.tmpfiles new file mode 100644 index 0000000..2c168a4 --- /dev/null +++ b/xl2tpd.tmpfiles @@ -0,0 +1 @@ +d /run/xl2tpd 0755 root root -