%define sname xl2tpd Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661) Name: xl2tpd Version: 1.3.18 Release: 1 License: GPLv2 URL: https://github.com/xelerance/xl2tpd Group: System/Base Source0: https://github.com/xelerance/xl2tpd/archive/v%{version}.tar.gz Source1: xl2tpd.service Source2: tmpfiles-xl2tpd.conf Patch1: %{sname}.c.patch Patch2: %{sname}-nokernel.patch Requires: ppp >= 2.4.5 #Requires: openswan Requires: strongswan # If you want to authenticate against a Microsoft PDC/Active Directory # Requires: samba-winbind BuildRequires: libpcap-devel BuildRequires: systemd-units BuildRequires: pkgconfig(openssl) Requires(post,preun,postun): systemd Conflicts: xl2tpd-kernel Provides: l2tpd Provides: xl2tpd-nokernel %description xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (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, RFC 3193). The L2TP/IPsec protocol is mainly used by Windows and Mac OS X clients. On Linux, xl2tpd can be used in combination with IPsec implementations such as Openswan. Example configuration files for such a setup are included in this RPM. xl2tpd works by opening a pseudo-tty for communicating with pppd. It runs completely in userspace. xl2tpd supports IPsec SA Reference tracking to enable overlapping internak NAT'ed IP's by different clients (eg all clients connecting from their linksys internal IP 192.168.1.101) as well as multiple clients behind the same NAT router. xl2tpd supports the pppol2tp kernel mode operations on 2.6.23 or higher, or via a patch in contrib for 2.4.x kernels. Xl2tpd is based on the 0.69 L2TP by Jeff McAdams It was de-facto maintained by Jacco de Leeuw in 2002 and 2003. %prep %setup -qn %{sname}-%{version} #patch1 -p1 #patch2 -p1 %build export CFLAGS="$CFLAGS -fPIC -Wall" export DFLAGS="$RPM_OPT_FLAGS -g " export LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now" %make %install make DESTDIR=%{buildroot} PREFIX=%{_prefix} install install -d 0755 %{buildroot}%{_unitdir} install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{sname}.service mkdir -p %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{sname}.conf install -p -D -m644 examples/%{sname}.conf %{buildroot}%{_sysconfdir}/%{sname}/%{sname}.conf install -p -D -m644 examples/ppp-options.%{sname} %{buildroot}%{_sysconfdir}/ppp/options.%{sname} install -p -D -m600 doc/l2tp-secrets.sample %{buildroot}%{_sysconfdir}/%{sname}/l2tp-secrets install -p -D -m600 examples/chapsecrets.sample %{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/%{sname} %preun %_preun_service %{sname} %post %_post_service %{sname} %files %doc BUGS CHANGES CREDITS LICENSE README.* TODO %doc doc/README.patents examples/chapsecrets.sample %{_sbindir}/%{sname} %{_sbindir}/%{sname}-control %{_bindir}/pfc %{_mandir}/*/* %dir %{_sysconfdir}/%{sname} %config(noreplace) %{_sysconfdir}/%{sname}/* %config(noreplace) %{_sysconfdir}/ppp/* %ghost %dir %{_localstatedir}/run/%{sname} %{_unitdir}/%{sname}.service %config(noreplace) %{_tmpfilesdir}/%{sname}.conf