Код: Выделить всё
[root@mail ~]# tail -f /var/log/messages
Nov 28 12:40:01 mail xl2tpd[2295]: Connection 7212 closed to 85.232.99.230, port 28342 (No Authorization)
Nov 28 12:40:01 mail xl2tpd[2295]: death_handler: Fatal signal 15 received
Nov 28 12:40:01 mail xl2tpd[2406]: setsockopt recvref[30]: Protocol not available
Nov 28 12:40:01 mail xl2tpd[2406]: Using l2tp kernel support.
Nov 28 12:40:01 mail xl2tpd[2407]: xl2tpd version xl2tpd-1.3.1 started on mail.pw-enot.ru PID:2407
Nov 28 12:40:01 mail xl2tpd[2407]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
Nov 28 12:40:01 mail xl2tpd[2407]: Forked by Scott Balmos and David Stipp, (C) 2001
Nov 28 12:40:01 mail xl2tpd[2407]: Inherited by Jeff McAdams, (C) 2002
Nov 28 12:40:01 mail xl2tpd[2407]: Forked again by Xelerance (http://www.xelerance.com) (C) 2006
Nov 28 12:40:01 mail xl2tpd[2407]: Listening on IP address 0.0.0.0, port 1701
Nov 28 12:40:04 mail xl2tpd[2407]: Connection 5417 closed to 85.232.99.230, port 61003 (No Authorization)
Nov 28 12:40:05 mail xl2tpd[2407]: Connection 28402 closed to 85.232.99.230, port 40941 (No Authorization)
^C
Код: Выделить всё
Nov 28 12:40:43 r-service mpd: L2TP: Initiating control connection 0x801e93810 0.0.0.0 0 <-> 95.30.222.42 1701
Nov 28 12:40:43 r-service mpd: L2TP: Control connection 0x801e93810 terminated: 6 (No Authorization)
Nov 28 12:40:43 r-service mpd: [L5] Link: DOWN event
Nov 28 12:40:43 r-service mpd: [L5] LCP: Down event
Nov 28 12:40:43 r-service mpd: [L5] Link: reconnection attempt 191 in 4 seconds
Nov 28 12:40:44 r-service mpd: L2TP: Control connection 0x801e94710 destroyed
Nov 28 12:40:47 r-service mpd: L2TP: Control connection 0x801e93510 destroyed
Nov 28 12:40:47 r-service mpd: [L5] Link: reconnection attempt 191
Nov 28 12:40:47 r-service mpd: L2TP: Initiating control connection 0x801e93510 0.0.0.0 0 <-> 95.30.222.42 1701
Nov 28 12:40:47 r-service mpd: L2TP: Control connection 0x801e93510 terminated: 6 (No Authorization)
Nov 28 12:40:47 r-service mpd: [L5] Link: DOWN event
Nov 28 12:40:47 r-service mpd: [L5] LCP: Down event
Nov 28 12:40:47 r-service mpd: [L5] Link: reconnection attempt 192 in 4 seconds
Nov 28 12:40:50 r-service mpd: L2TP: Control connection 0x801e93210 destroyed
Nov 28 12:40:51 r-service mpd: L2TP: Control connection 0x801e94a10 destroyed
Nov 28 12:40:51 r-service mpd: [L5] Link: reconnection attempt 192
Nov 28 12:40:51 r-service mpd: L2TP: Initiating control connection 0x801e94a10 0.0.0.0 0 <-> 95.30.222.42 1701
Nov 28 12:40:51 r-service mpd: L2TP: Control connection 0x801e94a10 terminated: 6 (No Authorization)
Nov 28 12:40:51 r-service mpd: [L5] Link: DOWN event
Nov 28 12:40:51 r-service mpd: [L5] LCP: Down event
Nov 28 12:40:51 r-service mpd: [L5] Link: reconnection attempt 193 in 1 seconds
Nov 28 12:40:52 r-service mpd: [L5] Link: reconnection attempt 193
Nov 28 12:40:52 r-service mpd: L2TP: Initiating control connection 0x801e93210 0.0.0.0 0 <-> 95.30.222.42 1701
Nov 28 12:40:52 r-service mpd: L2TP: Control connection 0x801e93210 terminated: 6 (No Authorization)
Nov 28 12:40:52 r-service mpd: [L5] Link: DOWN event
Nov 28 12:40:52 r-service mpd: [L5] LCP: Down event
Nov 28 12:40:52 r-service mpd: [L5] Link: reconnection attempt 194 in 1 seconds
^C
Код: Выделить всё
pw-enot.ru:
create bundle static B5
set iface route 10.5.0.0/24
create link static L5 l2tp
set link action bundle B5
set auth authname user
set auth password pass
set link mtu 1280
set link max-redial 0
set link no pap chap eap
set link enable chap
set link disable no retry
set link keep-alive 20 75
set l2tp disable windowing
set l2tp peer 95.30.222.42
open
Код: Выделить всё
[root@mail ~]# cat /etc/xl2tpd/xl2tpd.conf
[global] ;глобальная конфигурация
port = 1701 ;порт сервера
auth file = /etc/l2tpd/l2tp-secrets ;файл авторизации типа хост <-> хост
access control = no ; ограничение на доступ только с определенных хостов
rand source = dev
;
;
;
[lns hostname] ;имя нашего сервера, обычно исользуется просто имя вашего хоста
exclusive = no ;при параметре yes разрешено использовать один туннель с одного хоста.
ip range = 10.5.0.10-10.5.0.15 ;пул адресов выдаваемых клиентам
hidden bit = no
local ip = 10.5.0.7 ;внутренний айпи адрес нашего сервера
length bit = yes
require chap = yes ;требовать авторизацию CHAP
refuse pap = yes
refuse authentication = no
require authentication = no ;этот параметр указывает включена ли авторизация типа хост <-> хост
name = hostname ;тут пишите имя вашего хоста
ppp debug = yes ;для отладки на первое время
pppoptfile = /etc/ppp/options.xl2tpd ;опции для pppd
flow bit = yes
[root@mail ~]# cat /etc/ppp/options.xl2tpd
mtu 1410
noauth
mru 1410
lcp-echo-interval 3
lcp-echo-failure 8
nodeflate
noproxyarp
lock