Архивировано

Эта тема находится в архиве и закрыта для публикации сообщений.

skydark

FreeBSD MPD5.6 Самара

Рекомендованные сообщения

Добрый день уважаемые форумчане.

 

Уже неделю бьюсь над подключением впн к билайну, пересмотрел множество топиков, перепробывал массу настроек....все четно :(

 

Подскажите в какую сторону копать...уже нет сил, руки опускаются :(

 

Вот необходимые данные:

 

 

./mpd.log

 

 

CONSOLE: listening on 0.0.0.0 5005

web: listening on 0.0.0.0 5006

[L2TP] Bundle: Interface ng0 created

[L2] [L2] Link: OPEN event

[L2] LCP: Open event

[L2] LCP: state change Initial --> Starting

[L2] LCP: LayerStart

[L2] device: OPEN event

L2TP: ppp_l2tp_ctrl_create invoked

L2TP: Initiating control connection 0x801aa0a10 10.50.165.69 1701 <-> 172.19.193.5 1701

L2TP: Control connection 0x801aa0a10 10.50.165.69 1701 <-> 172.19.193.5 1701 initiated

L2TP: ppp_l2tp_ctrl_initiate invoked

L2TP: XMIT [MESSAGE_TYPE SCCRQ] [HOST_NAME "server.dklitvinova"] [VENDOR_NAME "FreeBSD MPD"] [bEARER_CAPABILITIES digital=1 analog=1] [RECEIVE_WINDOW_SIZE 8] [PROTOCOL_VERSION 1.0] [FRAMING_CAPABILITIES sync=1 async=1] [ASSIGNED_TUNNEL_ID 0x170a]

L2TP: RECV [MESSAGE_TYPE SCCRP] [PROTOCOL_VERSION 1.0] [FIRMWARE_REVISION 0x1120] [HOST_NAME "ccr-fttb.Samara"] [VENDOR_NAME "Cisco Systems, Inc."] [RECEIVE_WINDOW_SIZE 32000] [ASSIGNED_TUNNEL_ID 0x1bb9] [FRAMING_CAPABILITIES sync=0 async=0] [bEARER_CAPAB

L2TP: rec'd SCCRP in state wait-ctl-reply

L2TP: connected to "ccr-fttb.Samara", version=1.0

L2TP: XMIT [MESSAGE_TYPE SCCCN] [HOST_NAME "server.dklitvinova"] [VENDOR_NAME "FreeBSD MPD"] [bEARER_CAPABILITIES digital=1 analog=1] [RECEIVE_WINDOW_SIZE 8] [PROTOCOL_VERSION 1.0] [FRAMING_CAPABILITIES sync=1 async=1] [ASSIGNED_TUNNEL_ID 0x170a]

L2TP: Control connection 0x801aa0a10 10.50.165.69 1701 <-> 172.19.193.5 1701 connected

L2TP: ppp_l2tp_initiate invoked, ctrl=0x801aa0a10 out=0

L2TP: created new session #840000 id 0x62c1 orig=local side=LAC state=wait-cs-reply

L2TP: XMIT [MESSAGE_TYPE ICRQ] [ASSIGNED_SESSION_ID 0x62c1] [CALL_SERIAL_NUMBER 840000]

[L2] L2TP: Incoming call #840000 via control connection 0x801aa0a10 initiated

L2TP: ppp_l2tp_connected invoked, sess=0x801a0fa10

L2TP: RECV(0xc162) [MESSAGE_TYPE ICRP] [ASSIGNED_SESSION_ID 0xe80d]

L2TP: rec'd ICRP in state wait-cs-reply

L2TP: XMIT(0xe80d) [MESSAGE_TYPE ICCN] [TX_CONNECT_SPEED 10000000] [FRAMING_TYPE sync=1 async=0]

[L2] L2TP: Call #840000 connected

[L2] device: UP event

[L2] Link: UP event

[L2] Link: origination is local

[L2] LCP: Up event

[L2] LCP: state change Starting --> Req-Sent

[L2] LCP: phase shift DEAD --> ESTABLISH

[L2] LCP: SendConfigReq #1

[L2] MRU 1500

[L2] LCP: SendConfigReq #2

[L2] MRU 1500

[L2] LCP: rec'd Configure Request #1 (Req-Sent)

[L2] AUTHPROTO PAP

[L2] MAGICNUM d71026a2

[L2] LCP: SendConfigRej #1

[L2] MAGICNUM d71026a2

[L2] LCP: rec'd Configure Ack #2 (Req-Sent)

[L2] MRU 1500

[L2] LCP: state change Req-Sent --> Ack-Rcvd

[L2] LCP: rec'd Configure Request #2 (Ack-Rcvd)

[L2] AUTHPROTO PAP

[L2] LCP: SendConfigAck #2

[L2] AUTHPROTO PAP

[L2] LCP: state change Ack-Rcvd --> Opened

[L2] LCP: phase shift ESTABLISH --> AUTHENTICATE

[L2] LCP: auth: peer wants PAP, I want nothing

[L2] PAP: using authname "1111111@sam.fttb.b2b"

[L2] PAP: sending REQUEST #1 len: 38

[L2] LCP: LayerUp

[L2] PAP: rec'd ACK #1 len: 5

[L2] LCP: authorization successful

[L2] LCP: phase shift AUTHENTICATE --> NETWORK

[L2] Link: Matched action 'bundle "L2TP" ""'

[L2] Link: Join bundle "L2TP"

[L2TP] IFACE: setting ng0 MTU to 1460 bytes

[L2TP] Bundle: Status update: up 1 link, total bandwidth 64000 bps

[L2TP] IPCP: Open event

[L2TP] IPCP: state change Initial --> Starting

[L2TP] IPCP: LayerStart

[L2TP] IPCP: Up event

[L2TP] IPCP: state change Starting --> Req-Sent

[L2TP] IPCP: SendConfigReq #1

[L2TP] IPADDR 10.50.165.69

[L2TP] IPCP: rec'd Configure Request #1 (Req-Sent)

[L2TP] IPADDR 195.239.77.1

[L2TP] 195.239.77.1 is OK

[L2TP] IPCP: SendConfigAck #1

[L2TP] IPADDR 195.239.77.1

[L2TP] IPCP: state change Req-Sent --> Ack-Sent

[L2TP] IPCP: rec'd Configure Nak #1 (Ack-Sent)

[L2TP] IPADDR 195.239.162.244

[L2TP] 195.239.162.244 is OK

[L2TP] IPCP: SendConfigReq #2

[L2TP] IPADDR 195.239.162.244

[L2TP] IPCP: rec'd Configure Ack #2 (Ack-Sent)

[L2TP] IPADDR 195.239.162.244

[L2TP] IPCP: state change Ack-Sent --> Opened

[L2TP] IPCP: LayerUp

[L2TP] 195.239.162.244 -> 195.239.77.1

[L2TP] IFACE: Connecting tcpmssfix

[L2TP] IFACE: Add address 195.239.162.244/32->195.239.77.1 to ng0

[L2TP] system: /usr/local/etc/mpd5/up.sh ng0 inet 195.239.162.244/32 195.239.77.1 '-' '' '' '172.19.193.5'

[L2TP] IFACE: Up event

[L2TP] IFACE: Change interface flags: -0 +1

[L2] LCP: rec'd Echo Request #1 (Opened)

[L2] LCP: SendEchoRep #1

[L2] LCP: rec'd Echo Request #2 (Opened)

[L2] LCP: SendEchoRep #2

[L2] LCP: rec'd Echo Request #3 (Opened)

[L2] LCP: SendEchoRep #3

[L2] LCP: rec'd Echo Request #4 (Opened)

[L2] LCP: SendEchoRep #4

[L2] LCP: rec'd Echo Request #5 (Opened)

[L2] LCP: SendEchoRep #5

L2TP: RECV [MESSAGE_TYPE HELLO]

L2TP: rec'd HELLO in state established

[L2] LCP: rec'd Terminate Request #3 (Opened)

[L2] LCP: state change Opened --> Stopping

[L2] LCP: phase shift NETWORK --> TERMINATE

[L2] Link: Leave bundle "L2TP"

[L2] ACCT: Accounting data for user '': 62 seconds, 329 octets in, 644 octets out

[L2TP] IFACE: setting ng0 MTU to 1460 bytes

[L2TP] Bundle: Status update: up 0 links, total bandwidth 9600 bps

[L2TP] IPCP: Close event

[L2TP] IPCP: state change Opened --> Closing

[L2TP] IPCP: SendTerminateReq #3

[L2TP] IPCP: LayerDown

[L2TP] system: /usr/local/etc/mpd5/down.sh ng0 inet 195.239.162.244/32 195.239.77.1 '-' '172.19.193.5'

[L2TP] IFACE: Remove address 195.239.162.244/32->195.239.77.1 from ng0

[L2TP] IFACE: Down event

[L2TP] IFACE: Change interface flags: -4097 +0

[L2TP] IPCP: Down event

[L2TP] IPCP: LayerFinish

[L2TP] Bundle: No NCPs left. Closing links...

[L2TP] IPCP: state change Closing --> Initial

[L2] AUTH: Cleanup

[L2] LCP: SendTerminateAck #3

[L2] LCP: LayerDown

L2TP: RECV(0xc162) [MESSAGE_TYPE CDN] [RESULT_CODE result=2 error=6 errmsg=Locally generated disconnect] [ASSIGNED_SESSION_ID 0xe80d]

L2TP: rec'd CDN in state established

[L2] L2TP: call #840000 terminated: result=2 error=6 errmsg="Locally generated disconnect"

[L2] device: DOWN event

[L2] Link: DOWN event

[L2] LCP: Down event

[L2] LCP: state change Stopping --> Starting

[L2] LCP: phase shift TERMINATE --> DEAD

[L2] Link: reconnection attempt 1 in 63 seconds

caught fatal signal int

[L2TP] IFACE: Close event

[L2TP] IPCP: Close event

L2TP: RECV [MESSAGE_TYPE StopCCN] [RESULT_CODE result=1 error=0 errmsg=""] [ASSIGNED_TUNNEL_ID 0x1bb9]

L2TP: rec'd StopCCN in state established

L2TP: Control connection 0x801aa0a10 terminated: 0 ()

 

 

FreeBSD 8.3 + MPD5.6

 

mpd.conf

 

startup:

log +ALL -EVENTS -FRAME

set user admin admin admin

set user foo1 bar1

set console self 0.0.0.0 5005

set console open

set web self 0.0.0.0 5006

set web open

 

default:

load L2TP

#load PPTP

 

 

L2TP:

create bundle static L2TP

set bundle disable compression

set bundle disable round-robin

set bundle disable encryption

set bundle disable crypt-reqd

set bundle disable bw-manage

set bundle disable ipv6cp

set bundle enable ipcp

set ipcp no vjcomp

set iface mtu 1460

set iface idle 0

set iface enable tcpmssfix

set iface up-script /usr/local/etc/mpd5/up.sh

set iface down-script /usr/local/etc/mpd5/down.sh

create link static L2 l2tp

set link action bundle L2TP

set link latency 0

set link max-redial 0

set link redial-delay 60

set link disable incoming acfcomp protocomp magicnum check-magic shortseq

set link deny chap-md5 chap-msv2 chap-msv1 eap acfcomp protocomp shortseq

set link accept PAP

set link keep-alive 10 75

#set l2tp peer l2tp.corbina.net

#set l2tp peer tp.corbina.net

#set l2tp peer 85.21.0.25

set l2tp peer 172.19.193.5

#set l2tp self re0 1701

#set l2tp disable resolve-once

set auth authname "111111111@sam.fttb.b2b"

set auth password "11111111111"

open

 

 

PPTP:

create bundle static PPTP

set bundle disable compression

set bundle disable round-robin

set bundle disable encryption

set bundle disable crypt-reqd

set bundle disable bw-manage

set bundle disable ipv6cp

set bundle enable ipcp

set ipcp no vjcomp

set iface mtu 1460

set iface idle 0

set iface enable tcpmssfix

set iface up-script /usr/local/etc/mpd5/up.sh

set iface down-script /usr/local/etc/mpd5/down.sh

create link static L1 pptp

set link action bundle PPTP

set link latency 0

set link max-redial 0

set link redial-delay 60

set link disable incoming acfcomp protocomp magicnum check-magic shortseq

set link deny chap-md5 chap-msv2 chap-msv1 eap acfcomp protocomp shortseq

set link accept pap

set link keep-alive 10 75

set pptp peer 172.19.193.5

set auth authname "11111111@sam.fttb.b2b"

set auth password "1111111111"

open

 

 

 

up.sh

 

 

 

#!/bin/sh

/sbin/route delete $4

gw=`netstat -rn | awk '$1=="default"{print $2}'`

#gw=`195.239.77.1`

#route delete $4

/sbin/route add $4 $gw

/sbin/route delete default

/sbin/route add default $4

echo $4 > /tmp/mpd_dr

echo $gw > /tmp/mpd_gw

sleep 20

 

 

 

таблица до подключения

 

 

Routing tables

 

Internet:

Destination Gateway Flags Refs Use Netif Expire

default 10.50.165.65 UGS 0 3 re0

10.50.165.64/26 link#5 U 0 0 re0

10.50.165.69 link#5 UHS 0 0 lo0

127.0.0.1 link#10 UH 0 36 lo0

192.168.1.0/24 link#6 U 0 2241 re1

192.168.1.100 link#6 UHS 0 0 lo0

 

 

таблица во время подключения

 

 

Routing tables

 

Internet:

Destination Gateway Flags Refs Use Netif Expire

default 195.239.77.1 UGS 0 0 ng0

10.50.165.64/26 link#5 U 0 0 re0

10.50.165.69 link#5 UHS 0 0 lo0

127.0.0.1 link#10 UH 0 36 lo0

192.168.1.0/24 link#6 U 1 2264 re1

192.168.1.100 link#6 UHS 0 0 lo0

195.239.77.1 10.50.165.65 UGHS 0 0 re0

195.239.162.244 link#11 UHS 0 0 lo0

 

 

 

данные из форточки

 

 

впн отключен

ip 10.50.165.67 mask 255.255.255.192

gw 10.50.165.65

dns 172.19.193.19

 

впн подключен

ip 195.239.162.233 mask 255.255.255.255

dns 212.44.130.6

194.85.128.10

 

 

 

Редактировал ./dhclient по этой статье.....

 

НИД ХЕЛП!

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

P.S. Еще заметил вот такую странность в файле /etc/resolv.conf

 

search golden.ru

 

и все.... никаких других строк нет

 

Проблема на половину решилась....

Все дело было в маршрутах. сделал так

 

#!/bin/sh

gw=`netstat -rn | awk '$1=="default"{print $2}'`

route delete $8

route add $8 $gw

route delete default

route add default $4

 

echo $4 > /tmp/mpd_dr

echo $gw > /tmp/mpd_gw

 

Google по IP стал пинговаться, но по имени не хочет.

 

Думаю проблема в том, что по DHCP сервак не получает адреса ДНС серверов.....в место этого в файле resolv.conf : search golden.ru

 

Подскажите кто чем может)))

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

удалил из вайла /etc/dhcpclient.conf строчку domain-name-servers из блока request

 

и прописал в /etc/resolv.conf имена серверов.....заработало

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах