summaryrefslogtreecommitdiff
path: root/community/xl2tpd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/xl2tpd
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/xl2tpd')
-rw-r--r--community/xl2tpd/PKGBUILD49
-rw-r--r--community/xl2tpd/ipparam.patch36
-rw-r--r--community/xl2tpd/options.l2tpd24
-rw-r--r--community/xl2tpd/xl2tpd.conf.client-example19
-rw-r--r--community/xl2tpd/xl2tpd.conf.server-example21
-rw-r--r--community/xl2tpd/xl2tpd.service15
-rw-r--r--community/xl2tpd/xl2tpd.tmpfiles1
7 files changed, 165 insertions, 0 deletions
diff --git a/community/xl2tpd/PKGBUILD b/community/xl2tpd/PKGBUILD
new file mode 100644
index 000000000..2c513c4fb
--- /dev/null
+++ b/community/xl2tpd/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 91508 2013-05-23 10:16:34Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Hengfu <rhfcaesar@gmail.com>
+
+pkgname=xl2tpd
+pkgver=1.3.1
+pkgrel=3
+pkgdesc="an open source implementation of the L2TP maintained by Xelerance Corporation"
+arch=('i686' 'x86_64')
+url="http://www.xelerance.com/services/software/xl2tpd/"
+license=('GPL')
+depends=('ppp')
+options=(emptydirs zipman docs)
+backup=(etc/ppp/options.l2tpd)
+source=($pkgname-$pkgver.tar.gz::https://github.com/xelerance/xl2tpd/archive/v$pkgver.tar.gz
+ xl2tpd.conf.client-example
+ xl2tpd.conf.server-example
+ options.l2tpd
+ xl2tpd.service
+ xl2tpd.tmpfiles
+ ipparam.patch)
+md5sums=('38c2461d3562f98b08454ca403706886'
+ '5f0ae07026e61a3dd15a76fd4144a6d5'
+ '16ed0886115d4dcc21072cfb847250bb'
+ 'ed57eb67335cdf246251285dad502cc7'
+ '219942dd098ce4fdba37d1db327baf57'
+ '2e95e4fc03e1521ab20fd7e249efab5a'
+ '4d258a58cc109d5c4d96af8f81d481cf')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ patch -p1 <$srcdir/ipparam.patch
+
+ make KERNELSRC=/usr/src/linux-`uname -r` PREFIX=/usr SBINDIR=/usr/bin
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make KERNELSRC=/usr/src/linux-`uname -r` PREFIX=/usr DESTDIR=$pkgdir SBINDIR=$pkgdir/usr/bin install
+
+ install -D -m0644 $srcdir/xl2tpd.conf.client-example $pkgdir/etc/xl2tpd/xl2tpd.conf.client-example
+ install -D -m0644 $srcdir/xl2tpd.conf.server-example $pkgdir/etc/xl2tpd/xl2tpd.conf.server-example
+ install -D -m0644 $srcdir/options.l2tpd $pkgdir/etc/ppp/options.l2tpd
+
+ install -Dm0644 $srcdir/xl2tpd.service $pkgdir/usr/lib/systemd/system/xl2tpd.service
+ install -Dm0644 $srcdir/xl2tpd.tmpfiles $pkgdir/usr/lib/tmpfiles.d/xl2tpd.conf
+}
diff --git a/community/xl2tpd/ipparam.patch b/community/xl2tpd/ipparam.patch
new file mode 100644
index 000000000..9c2fd8400
--- /dev/null
+++ b/community/xl2tpd/ipparam.patch
@@ -0,0 +1,36 @@
+diff -wbBur xl2tpd-1.2.8/control.c xl2tpd-1.2.8.my/control.c
+--- xl2tpd-1.2.8/control.c 2011-02-23 08:10:21.000000000 +0300
++++ xl2tpd-1.2.8.my/control.c 2011-03-25 21:29:29.896518014 +0300
+@@ -892,8 +892,8 @@
+ po = add_opt (po, c->lac->pppoptfile);
+ }
+ };
+- po = add_opt (po, "ipparam");
+- po = add_opt (po, IPADDY (t->peer.sin_addr));
++// po = add_opt (po, "ipparam");
++// po = add_opt (po, IPADDY (t->peer.sin_addr));
+ start_pppd (c, po);
+ opt_destroy (po);
+ if (c->lac)
+@@ -966,8 +966,8 @@
+ po = add_opt (po, "file");
+ po = add_opt (po, c->lns->pppoptfile);
+ }
+- po = add_opt (po, "ipparam");
+- po = add_opt (po, IPADDY (t->peer.sin_addr));
++// po = add_opt (po, "ipparam");
++// po = add_opt (po, IPADDY (t->peer.sin_addr));
+ start_pppd (c, po);
+ opt_destroy (po);
+ l2tp_log (LOG_NOTICE,
+@@ -1026,8 +1026,8 @@
+ po = add_opt (po, c->lac->pppoptfile);
+ }
+ };
+- po = add_opt (po, "ipparam");
+- po = add_opt (po, IPADDY (t->peer.sin_addr));
++// po = add_opt (po, "ipparam");
++// po = add_opt (po, IPADDY (t->peer.sin_addr));
+ start_pppd (c, po);
+
+ /* jz: just show some information */
diff --git a/community/xl2tpd/options.l2tpd b/community/xl2tpd/options.l2tpd
new file mode 100644
index 000000000..3030af4a7
--- /dev/null
+++ b/community/xl2tpd/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/community/xl2tpd/xl2tpd.conf.client-example b/community/xl2tpd/xl2tpd.conf.client-example
new file mode 100644
index 000000000..7420f940d
--- /dev/null
+++ b/community/xl2tpd/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 <name>]
+lns = <host>
+redial = yes
+redial timeout = 5
+require chap = yes
+require authentication = no
+ppp debug = no
+pppoptfile = /etc/ppp/peers/<ppp-opts>
+require pap = no
+autodial = yes
diff --git a/community/xl2tpd/xl2tpd.conf.server-example b/community/xl2tpd/xl2tpd.conf.server-example
new file mode 100644
index 000000000..a967a3d5f
--- /dev/null
+++ b/community/xl2tpd/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 <name>]
+require chap = yes
+ppp debug = no
+pppoptfile = /etc/ppp/options.l2tpd
+require pap = no
+assign ip = yes
+hostname = <hostname>
+ip range = <range>
+local ip = <ip>
+challenge = no
+lac = <lacs>
+require authentication = no
diff --git a/community/xl2tpd/xl2tpd.service b/community/xl2tpd/xl2tpd.service
new file mode 100644
index 000000000..e55b9cb12
--- /dev/null
+++ b/community/xl2tpd/xl2tpd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Level 2 Tunnel Protocol Daemon (L2TP)
+After=syslog.target 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/community/xl2tpd/xl2tpd.tmpfiles b/community/xl2tpd/xl2tpd.tmpfiles
new file mode 100644
index 000000000..139680eb2
--- /dev/null
+++ b/community/xl2tpd/xl2tpd.tmpfiles
@@ -0,0 +1 @@
+d /var/run/xl2tpd 0755 root root -