User Tools

Site Tools


debian_l2tp_pptp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

debian_l2tp_pptp [2019/09/13 06:26] (current)
admin created
Line 1: Line 1:
 +==== PPTP server: ====
 +=== /​etc/​pptpd.conf ===
 +<​code>​
 +option /​etc/​ppp/​pptpd-options
 +logwtmp
 +localip 10.51.0.1
 +</​code>​
  
 +=== /​etc/​ppp/​pptpd-options ===
 +<​code>​
 +name pptpd
 +refuse-pap
 +refuse-chap
 +refuse-mschap
 +require-mschap-v2
 +#​require-mppe-128
 +ms-dns 1.1.1.1
 +ms-dns 4.2.2.1
 +ms-dns 8.8.8.8
 +proxyarp
 +lock
 +nobsdcomp
 +novj
 +novjccomp
 +nologfd
 +nodefaultroute
 +</​code>​
 +
 +==== L2TP server ====
 +=== /​etc/​xl2tpd/​xl2tpd.conf ===
 +<​code>​
 +[global] ​ ; Global parameters:
 +port = 1701  ; * Bind to port 1701
 +ipsec saref = yes
 +[lns default] ​ ; Our fallthrough LNS definition
 +ip range = 10.52.0.2-10.52.1.100 ​ ; * Allocate from this IP range
 +local ip = 10.52.0.1 ​ ; * Our local IP to use
 +length bit = yes  ; * Use length bit in payload?
 +refuse pap = yes  ; * Refuse PAP authentication
 +refuse chap = yes  ; * Refuse CHAP authentication
 +require authentication = yes  ; * Require peer to authenticate
 +pppoptfile = /​etc/​ppp/​options.xl2tpd ​ ; * ppp options file
 +</​code>​
 +
 +=== /​etc/​ppp/​options.xl2tpd ===
 +<​code>​
 +require-mschap-v2
 +#​require-mppe
 +refuse-pap
 +refuse-chap
 +refuse-eap
 +refuse-mschap
 +ms-dns 1.1.1.1
 +ms-dns 8.8.4.4
 +asyncmap 0
 +auth
 +crtscts
 +lock
 +hide-password
 +modem
 +debug
 +name xl2tpd
 +proxyarp
 +lcp-echo-interval 30
 +lcp-echo-failure 4
 +nodefaultroute
 +</​code>​
 +
 +==== Secrets ====
 +=== /​etc/​ppp/​chap-secrets ===
 +<​code>​
 +# Secrets for authentication using CHAP
 +# client ​       server ​ secret ​                 IP addresses
 +user1 pptpd abcDEF123$%^ "​10.51.0.2"​
 +user2 * defABC456!@#​ "​10.52.0.2"​
 +</​code>​
 +
 +==== Routes behind clients ====
 +=== /​etc/​ppp/​ip-up.d/​01_l2tp_routes ===
 +<​code>​
 +#!/bin/bash
 +ip route add 192.168.42.0/​24 via 10.52.0.2 metric 2
 +exit 0
 +</​code>​
debian_l2tp_pptp.txt ยท Last modified: 2019/09/13 06:26 by admin