установил xl2tpd, настроил:----------------------
options.xl2tp:
ipcp-accept-local
ipcp-accept-remote
ms-dns 10.1.1.1
ms-dns 10.1.1.3
ms-wins 10.1.1.1
#ms-wins 192.168.1.4
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
------------------
xl2tpd.conf:
[global]
port = 1701
debug network = yes
debug state = yes
[lns default]
ip range = 10.1.1.220-10.1.1.230
local ip = 10.1.1.2
require chap = yes
refuse pap = yes
require authentication = yes
name = VPNserver
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes
exclusive = no
----------------
проблема: если клиент (Windows XP) подключается из одной подсети с сервером впн - то все нормально, если же через с другой, через маршрутизатор, - то не подключается.
вот логи при ошибке:
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
xl2tpd[31305]: ourtid = 24713, entropy_buf = 6089
xl2tpd[31305]: ourcid = 6188, entropy_buf = 182c
xl2tpd[31305]: check_control: control, cid = 0, Ns = 0, Nr = 0
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Request(1). Tunnel is 21, call is 0.
xl2tpd[31305]: control_finish: sending SCCRP
xl2tpd[31305]: trying to send control packet to 24713
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 0
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
xl2tpd[31305]: ourtid = 41123, entropy_buf = a0a3
xl2tpd[31305]: ourcid = 56230, entropy_buf = dba6
xl2tpd[31305]: check_control: control, cid = 0, Ns = 0, Nr = 0
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Request(1). Tunnel is 21, call is 0.
xl2tpd[31305]: control_finish: Peer requested tunnel 21 twice, ignoring second one.
xl2tpd[31305]: control_zlb: sending control ZLB on tunnel 21
xl2tpd[31305]: call_close: Actually closing tunnel 41123
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
xl2tpd[31305]: ourtid = 48426, entropy_buf = bd2a
xl2tpd[31305]: ourcid = 48507, entropy_buf = bd7b
xl2tpd[31305]: check_control: control, cid = 0, Ns = 0, Nr = 0
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Request(1). Tunnel is 21, call is 0.
xl2tpd[31305]: control_finish: Peer requested tunnel 21 twice, ignoring second one.
xl2tpd[31305]: control_zlb: sending control ZLB on tunnel 21
xl2tpd[31305]: call_close: Actually closing tunnel 48426
xl2tpd[31305]: network_thread: select timeout
xl2tpd[31305]: trying to send control packet to 24713
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 0
xl2tpd[31305]: network_thread: select timeout
xl2tpd[31305]: trying to send control packet to 24713
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 0
xl2tpd[31305]: network_thread: select timeout
xl2tpd[31305]: trying to send control packet to 24713
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 0
xl2tpd[31305]: network_thread: select timeout
xl2tpd[31305]: trying to send control packet to 24713
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 0
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
xl2tpd[31305]: ourtid = 3412, entropy_buf = d54
xl2tpd[31305]: ourcid = 1022, entropy_buf = 3fe
xl2tpd[31305]: check_control: control, cid = 0, Ns = 0, Nr = 0
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Request(1). Tunnel is 21, call is 0.
xl2tpd[31305]: control_finish: Peer requested tunnel 21 twice, ignoring second one.
xl2tpd[31305]: control_zlb: sending control ZLB on tunnel 21
xl2tpd[31305]: call_close: Actually closing tunnel 3412
xl2tpd[31305]: network_thread: select timeout
xl2tpd[31305]: trying to send control packet to 24713
xl2tpd[31305]: Maximum retries exceeded for tunnel 24713. Closing.
-------------
Вот логи при нормальном подключении (когда и сервер и клиент в одной подсети)
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
xl2tpd[31305]: ourtid = 63983, entropy_buf = f9ef
xl2tpd[31305]: ourcid = 23947, entropy_buf = 5d8b
xl2tpd[31305]: check_control: control, cid = 0, Ns = 0, Nr = 0
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Request(1). Tunnel is 20, call is 0.
xl2tpd[31305]: control_finish: sending SCCRP
xl2tpd[31305]: trying to send control packet to 63983
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 0
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
xl2tpd[31305]: ourtid = 50673, entropy_buf = c5f1
xl2tpd[31305]: ourcid = 32202, entropy_buf = 7dca
xl2tpd[31305]: check_control: control, cid = 0, Ns = 0, Nr = 0
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Request(1). Tunnel is 20, call is 0.
xl2tpd[31305]: control_finish: Peer requested tunnel 20 twice, ignoring second one.
xl2tpd[31305]: control_zlb: sending control ZLB on tunnel 20
xl2tpd[31305]: call_close: Actually closing tunnel 50673
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 20, tunnel = 63983, call = 0 ref=0 refhim=0
xl2tpd[31305]: check_control: control, cid = 0, Ns = 1, Nr = 1
xl2tpd[31305]: control_finish: message type is Start-Control-Connection-Connected(3). Tunnel is 20, call is 0.
xl2tpd[31305]: Connection established to 10.1.48.115, 1701. Local: 63983, Remote: 20 (ref=0/0). LNS session is 'default'
xl2tpd[31305]: control_finish: scheduling initial HELLO on 63983
xl2tpd[31305]: control_zlb: sending control ZLB on tunnel 20
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 48, tunnel = 63983, call = 0 ref=0 refhim=0
xl2tpd[31305]: check_control: control, cid = 0, Ns = 2, Nr = 1
xl2tpd[31305]: ourcid = 60, entropy_buf = 3c
xl2tpd[31305]: control_finish: message type is Incoming-Call-Request(10). Tunnel is 20, call is 0.
xl2tpd[31305]: control_finish: Sending ICRP
xl2tpd[31305]: trying to send control packet to 63983
xl2tpd[31305]: control_xmit: Scheduling and transmitting packet 1
xl2tpd[31305]: control_zlb: sending control ZLB on tunnel 20
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 48, tunnel = 63983, call = 60 ref=0 refhim=0
xl2tpd[31305]: check_control: control, cid = 1, Ns = 3, Nr = 2
xl2tpd[31305]: control_finish: message type is Incoming-Call-Connected(12). Tunnel is 20, call is 1.
xl2tpd[31305]: start_pppd: I'm running:
xl2tpd[31305]: "/usr/sbin/pppd"
xl2tpd[31305]: "passive"
xl2tpd[31305]: "nodetach"
----
отличия начинаются со строки
не рабочая:
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 94, tunnel = 0, call = 0 ref=0 refhim=0
рабочая:
xl2tpd[31305]: network_thread: recv packet from 10.1.48.115, size = 20, tunnel = 63983, call = 0 ref=0 refhim=0
--------------------
в чем проблема, почему xl2tpd через маршрутизатор не работает ?