--- /dev/null
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=xl2tpd
+PKG_VERSION:=1.1.09
+PKG_RELEASE:=1.0
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.xelerance.com/software/xl2tpd
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/xl2tpd
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
+ DESCRIPTION:=\
+ l2tpd is the open source implementation of the L2TP tunneling \\\
+ protocol (RFC2661). It does implement both LAC and LNS role \\\
+ in a L2TP networking architecture. The main goal of this protocol is \\\
+ to tunnel PPP frame trough an ip network.
+ URL:=http://www.xelerance.com/software/xl2tpd
+endef
+
+define Package/xl2tpd/conffiles
+/etc/xl2tpd/xl2tpd.conf
+endef
+
+define Build/Compile
+ $(call Build/Compile/Default, \
+ CFLAGS="$(TARGET_CFLAGS) -I. -DLINUX -DSANITY -DIP_ALLOCATION" \
+ )
+endef
+
+define Package/xl2tpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/xl2tpd
+ $(INSTALL_DATA) ./files/xl2tpd.conf $(1)/etc/xl2tpd/
+ $(INSTALL_DATA) ./files/l2tp-secrets $(1)/etc/xl2tpd/
+ $(INSTALL_DATA) ./files/options.l2tp $(1)/etc/xl2tpd/
+# $(INSTALL_DIR) $(1)/etc/ppp
+# $(INSTALL_DATA) ./files/options.l2tpd $(1)/etc/ppp/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/xl2tpd.init $(1)/etc/init.d/xl2tpd
+endef
+
+$(eval $(call BuildPackage,xl2tpd))
+
--- /dev/null
+OpenWRT Package for xl2tpd
+
+xl2tpd is a development from the original l2tpd package originally written by
+Mark Spencer, subsequently forked by Scott Balmos and David Stipp, inherited
+by Jeff McAdams, modified substantially by Jacco de Leeuw and then forked
+again by Xelerance (after it was abandoned by l2tpd.org).
+
+Rationale for inclusion in OpenWRT:
+
+l2tpd has some serious alignment problems on RISC platforms. It also runs
+purely in userspace.
+
+Some of the features added in this fork include:
+
+1. IPSec SA reference tracking inconjunction with openswan's IPSec transport
+ mode, which adds support for multiple clients behind the same NAT router
+ and multiple clients on the same internal IP behind different NAT routers.
+
+2. Support for the pppol2tp kernel mode L2TP.
+
+3. Alignment and endian problems resolved.
+
+hcg
--- /dev/null
+uthenticating l2tp tunnels
+# us them secret
+mia zidler abcd1234
+
--- /dev/null
+#
+
+lock
+noauth
+debug
+dump
+logfd 2
+logfile /var/log/l2tpd.log
+noccp
+novj
+novjccomp
+nopcomp
+noaccomp
+
+
--- /dev/null
+[global]
+port = 1701
+auth file = /etc/xl2tpd/l2tp-secrets
+access control = no
+; rand source = dev
+
+[lns default]
+exclusive = yes
+ip range = 192.168.254.202-192.168.254.210
+lac = 10.0.1.2
+hidden bit = no
+local ip = 192.168.254.200
+length bit = yes
+refuse authentication = yes
+;require chap = yes
+;refuse pap = yes
+;refuse chap = no
+;require authentication = yes
+;unix authentication = no
+name = VersaLink
+ppp debug = yes
+pppoptfile = /etc/xl2tpd/options.l2tp
+; call rws = 10
+; tunnel rws = 4
+; flow bit = yes
+; challenge = yes
+;
+
+[lac left]
+lns = 10.0.1.2
+; lns = lns2.marko.net
+; redial = yes
+; redial timeout = 15
+; max redials = 5
+; hidden bit = yes
+; local ip = 192.168.1.1
+; remote ip = 192.168.1.2
+; length bit = no
+refuse authentication = yes
+; require pap = no
+; require chap = yes
+; refuse pap = yes
+; refuse chap = no
+; require authentication = yes
+name = VersaLink
+ppp debug = yes
+; pppoptfile = /etc/ppp/options
+pppoptfile = /etc/xl2tpd/options.l2tp
+; call rws = 10
+; tunnel rws = 4
+; flow bit = yes
+; challenge = yes
+;
+; [lac cisco]
+; lns = cisco.marko.net
+; require authentication = yes
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=60
+BIN=xl2tpd
+DEFAULT=/etc/default/$BIN
+RUN_D=/var/run
+PID_F=$RUN_D/$BIN.pid
+
+start() {
+ mkdir -p $RUN_D/$BIN
+ [ -f $DEFAULT ] && . $DEFAULT
+ $BIN $OPTIONS
+}
+
+stop() {
+ [ -f $PID_F ] && kill $(cat $PID_F)
+}
+