View previous topic :: View next topic |
Author |
Message |
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Mon Oct 10, 2005 12:05 pm Post subject: vpn ppp ?? |
|
|
Привет
У меня проблема с vpn u ppp. Я никак немогу приконектитса к серверу(vpn win server
Linux client(kvpnc)------local_net----iptables(nat)--------internet------Win_vpn_server
/etc/ppp/peers/MyPeer
pty "pptp remote_server_ip --nolaunchpppd"
name remote_domain\\user #DOMAIN\\USERNAME
require-mschap-v2
remotename remote_vpn_server_name #??
file /etc/ppp/options.MyPeer
ipparam MyPeer #tunnel name
/etc/ppp/options.MyPeer
lock
noauth
nobsdcomp
nodeflate
mppe required,stateless
mtu 1000
mru 1000
lcp-echo-failure 10
lcp-echo-interval 10
/etc/ppp/chap-secrets
remote_domain\\user MyPeer pass *
MyPeer remote_domain\\user pass *
PC return me :
Code:
Code: | pon MyPeer debug dump logfd 2 nodetach |
pppd options in effect:
debug # (from command line)
nodetach # (from command line)
logfd 2 # (from command line)
dump # (from command line)
noauth # (from /etc/ppp/options.MyPeer)
name remote_domain\\user # (from /etc/ppp/peers/MyPeer)
remotename remote_vpn_server_name # (from /etc/ppp/peers/MyPeer)
pty pptp remote_ip --nolaunchpppd # (from /etc/ppp/peers/MyPeer)
mru 1000 # (from /etc/ppp/options.MyPeer)
mtu 1000 # (from /etc/ppp/options.MyPeer)
lcp-echo-failure 10 # (from /etc/ppp/options.MyPeer)
lcp-echo-interval 10 # (from /etc/ppp/options.MyPeer)
ipparam world-link # (from /etc/ppp/peers/MyPeer)
nobsdcomp # (from /etc/ppp/options.MyPeer)
nodeflate # (from /etc/ppp/options.MyPeer)
mppe xxx # [don't know how to print value] # (from /etc/ppp/options.MyPeer)
using channel 21
Using interface ppp0
Connect: ppp0 <--> /dev/pts/11
sent [LCP ConfReq id=0x1 <mru 1000> <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <auth chap MS-v2> <magic 0x313e69a2> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:72.b5.8e.b2.12.fa.45.ec.a9.a2.71.f2.fe.cd.45.9d.00.00.00.00]> < 17 04 03 59>]
No auth is possible
sent [LCP ConfRej id=0x0 <auth chap MS-v2> <callback CBCP> <mrru 1614> < 17 04 03 59>]
rcvd [LCP ConfNak id=0x1 <mru 1500>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
rcvd [LCP TermReq id=0x1 "1>i\37777777642\000<\37777777715t\000\000\003\37777777627"]
sent [LCP TermAck id=0x1]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xf58b0f4> <pcomp> <accomp>]
LCP: timeout sending Config-Requests
Connection terminated.
Waiting for 1 child processes...
script pptp remote_ip --nolaunchpppd, pid 13857
Script pptp remote_ip --nolaunchpppd finished (pid 13857), status = 0x0 |
|
Back to top |
|
|
ba l33t
Joined: 25 May 2003 Posts: 804
|
Posted: Mon Oct 10, 2005 12:20 pm Post subject: |
|
|
а ядро у тебя отпатчено для поддержки mppc и mppe?
[edit]
и в remotename надо писать MyPeer, который из /etc/ppp/chap-secrets |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Mon Oct 10, 2005 1:31 pm Post subject: |
|
|
2 ba Спасибо
Проблема была в remotename |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Tue Oct 11, 2005 3:35 pm Post subject: |
|
|
я поспешыл проблема осталась : у меня неполучаетса пропынгать другую машыну но связь и интерфейс поднимаютса
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/pts/2
sent [LCP ConfReq id=0x1 <mru 1000> <asyncmap 0x0> <magic 0xb5cac119> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <auth chap MS-v2> <magic 0x6c383273> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:72.b5.8e.b2.12.fa.45.ec.a9.a2.71.f2.fe.cd.45.9d.00.00.00.00]> < 17 04 03 86>]
sent [LCP ConfRej id=0x0 <callback CBCP> <mrru 1614> < 17 04 03 86>]
rcvd [LCP ConfNak id=0x1 <mru 1500>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <magic 0xb5cac119> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <auth chap MS-v2> <magic 0x6c383273> <pcomp> <accomp> <endpoint [local:72.b5.8e.b2.12.fa.45.ec.a9.a2.71.f2.fe.cd.45.9d.00.00.00.00]>]
sent [LCP ConfAck id=0x1 <auth chap MS-v2> <magic 0x6c383273> <pcomp> <accomp> <endpoint [local:72.b5.8e.b2.12.fa.45.ec.a9.a2.71.f2.fe.cd.45.9d.00.00.00.00]>]
rcvd [LCP ConfAck id=0x2 <asyncmap 0x0> <magic 0xb5cac119> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0xb5cac119]
rcvd [CHAP Challenge id=0x0 <1fcaf19461bc082780f7ead024f16bd7>, name = "NYSERVER010"]
sent [CHAP Response id=0x0 <89d587391e9318589c3a107d971908480000000000000000841fb9988996062162a8aa1dfb412d4813304175cd6a8ac900>, name = "wlink\\vzazulya"]
rcvd [LCP EchoRep id=0x0 magic=0x6c383273]
rcvd [CHAP Success id=0x0 "S=4704E332BE0F9639229DEB541D548C394A9F2A4A"]
sent [CCP ConfReq id=0x1 <mppe +H +M +S +L -D +C>]
rcvd [CCP ConfReq id=0x3 <mppe +H -M -S -L -D +C>]
sent [CCP ConfNak id=0x3 <mppe +H +M +S +L -D +C>]
rcvd [IPCP ConfReq id=0x4 <addr 172.16.9.52>]
sent [IPCP TermAck id=0x4]
rcvd [CCP ConfNak id=0x1 <mppe +H -M +S -L -D +C>]
sent [CCP ConfReq id=0x2 <mppe +H -M +S -L -D +C>]
rcvd [CCP ConfReq id=0x5 <mppe +H -M +S -L -D +C>]
sent [CCP ConfAck id=0x5 <mppe +H -M +S -L -D +C>]
rcvd [CCP ConfAck id=0x2 <mppe +H -M +S -L -D +C>]
MPPC/MPPE 128-bit stateless compression enabled
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.2.79>]
rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
sent [IPCP ConfReq id=0x2 <addr 192.168.2.79>]
rcvd [IPCP ConfAck id=0x2 <addr 192.168.2.79>]
rcvd [IPCP ConfReq id=0x6 <addr 172.16.9.52>]
sent [IPCP ConfAck id=0x6 <addr 172.16.9.52>]
local IP address 192.168.2.79
remote IP address 172.16.9.52
Script /etc/ppp/ip-up started (pid 7958)
Script /etc/ppp/ip-up finished (pid 7958), status = 0x1
ччTerminating on signal 2.
Script /etc/ppp/ip-down started (pid 7974)
MPPE disabled
sent [LCP TermReq id=0x3 "MPPE disabled"]
sent [LCP TermReq id=0x4 "MPPE disabled"]
Script pptp 69.64.217.209 --nolaunchpppd finished (pid 7891), status = 0x0
Script /etc/ppp/ip-down finished (pid 7974), status = 0x1
Modem hangup
Connection terminated.
Connect time 2.3 minutes.
Sent 80 bytes, received 112 bytes.
Connect time 2.3 minutes.
Sent 80 bytes, received 112 bytes.
сontrol+с |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Wed Oct 12, 2005 10:20 am Post subject: |
|
|
Что с моим mppe ?
я использовал Howto http://gentoo-wiki.com/HOWTO_PPTP_VPN_client_%28Microsoft-compatible_with_mppe%29
Code:
strings `which pppd`|grep -i mppe
set_mppe_enc_types
mppe_recv_key
mppe_keys_set
mppe_send_key
mppe_set_keys
request MPPE encryption
+mppe
nomppe
don't allow MPPE encryption
-mppe
MPPE disabled, closing LCP
MPPE disabled by peer
MPPC/MPPE
MPPE disabled
mppe %s %s %s %s %s %s
Too many MPPE errors
You require MPPE but you have switched off all encryption key lengths.
invalid parameter '%s' for mppe option
MPPE required but peer negotiation failed
MPPE required, but kernel has no support.
MPPE required but not available
MPPE required, but keys are not available. Possible plugin problem?
MPPE required, but MS-CHAP[v2] auth not performed.
MPPE required, but auth done in both directions.
MPPE required but not available in kernel
MPPE required but cannot negotiate MPPE key length
Cannot negotiate MPPE key length
Too many MPPE errors, closing LCP |
|
Back to top |
|
|
kon Apprentice
Joined: 05 Mar 2004 Posts: 156 Location: Russia. Saint-Petersburg
|
Posted: Wed Oct 12, 2005 11:40 am Post subject: |
|
|
поставь mtu и mru в 1300 попробуй. |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Wed Oct 12, 2005 11:53 am Post subject: |
|
|
2 kon непомогло
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.2.41 P-t-P:172.16.9.52 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1300 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:568 (568.0 b) TX bytes:576 (576.0 b)
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.9.52 * 255.255.255.255 UH 0 0 0 ppp0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
172.16.0.0 * 255.255.0.0 U 0 0 0 ppp0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 192.168.2.1 0.0.0.0 UG 0 0 0 eth0 |
|
Back to top |
|
|
fank l33t
Joined: 16 Oct 2004 Posts: 794 Location: Minsk, Belarus
|
Posted: Wed Oct 12, 2005 1:38 pm Post subject: |
|
|
дефолтным маршрутом сделай твой впн сервер, а на сеть 192.*.*.* повесь отдельный шлюз
всё у тя работает, ток пакеты не туда идут
Code: | route del default
route add default gw 172.16.9.52
route add -net 192.168.2.1 gw 192.168.2.1 |
|
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Thu Oct 13, 2005 6:55 am Post subject: |
|
|
local network 192.168.2.0/24
remote network 172.16.0.0/16
local gateway 192.168.2.1
remote vpn server 69.64.217.209
dns 194.44.214.32
Kernel IP routing table
Destination | | Gateway ||Genmask || Flags Metric ||Ref || Use Iface
192.168.2.1 | | 192.168.2.1 || 255.255.255.255|| UGH || 0|| 0 || 0 ||eth0
172.16.9.52 || 0.0.0.0 ||255.255.255.255 ||UH || 0 || 0 || 0|| ppp0
194.44.214.0 ||192.168.2.1 || 255.255.255.0 ||UG || 0 || 0 || 0 ||eth0
192.168.2.0 || 0.0.0.0 ||255.255.255.0| |U || 0 || 0 || 0 ||eth0
69.0.0.0 ||192.168.2.1 || 255.0.0.0 || UG || 0 || 0 || 0 ||eth0
127.0.0.0 ||127.0.0.1 || 255.0.0.0 ||UG || 0 || 0 || 0 ||lo
default ||172.16.9.52 || 0.0.0.0 ||UG || 0 || 0 || 0 ||ppp0
Неработа╓т |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Thu Oct 13, 2005 9:04 am Post subject: |
|
|
fank wrote: |
Code: |
route add -net 192.168.2.1 gw 192.168.2.1 |
| для чего ето нужно ??
192.168.2.1 ето gateway зачем так делать ?? |
|
Back to top |
|
|
fank l33t
Joined: 16 Oct 2004 Posts: 794 Location: Minsk, Belarus
|
Posted: Thu Oct 13, 2005 10:48 am Post subject: |
|
|
пардон, описка вышла, надо так
Code: | route add -net 192.168.2.0 gw 192.168.2.1 |
то есть для внешних сетей указать явно шлюзы, а в инет смотреть (то есть шлюз по умолчанию) через впн-сервер, или интерфейс ppp0, тогда система будет смотреть в какую подсеть через какой шлюз слать пакеты, а если хост не попадёт во внутренню сеть, то пойдёт на впн-сервак, на котором должен быть доступ в инет
далее и смотришь через какой шлюз идёт
или просто пропингуй
...................
погоди, а как это согласуется между собой:
Quote: | remote vpn server 69.64.217.209 |
и это:
*******************quote*******************
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.2.41 P-t-P:172.16.9.52 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1300 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:568 (568.0 b) TX bytes:576 (576.0 b)
*********quote************************************
у тебя ведь соединение точка-точка, твой интерфей ppp0 и удалённый с адресом 172.16.9.52, который, по идее, и должен быть впн-сервером
если у тебя доступ к впн-серверу через подсеть 172.х.х.х, тогда добавь маршрут к нему через эту подсеть так:
Code: | route add -host 69.64.217.209 gw шлюз_в_подсеть 172.х.х.х |
хотя 172.16.9.52 - это, скорее всего, внутренний интерфейс впн-сервера с внешним статическим адресом 69.64.217.209 |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Thu Oct 13, 2005 1:15 pm Post subject: |
|
|
Code: | eth0 Link encap:Ethernet HWaddr 00:11:2F:D1:02:BE
inet addr:192.168.2.41 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:155998 errors:0 dropped:0 overruns:0 frame:0
TX packets:105180 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25746620 (24.5 Mb) TX bytes:24546525 (23.4 Mb)
Interrupt:11 Base address:0xe800
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.2.41 P-t-P:172.16.9.52 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1404 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1064 (1.0 Kb) TX bytes:163436 (159.6 Kb) |
Code: |
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.9.52 * 255.255.255.255 UH 0 0 0 ppp0
69.64.217.209.n 192.168.2.1 255.255.255.255 UGH 0 0 0 eth0
194.44.214.0 192.168.2.1 255.255.255.0 UG 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
172.16.0.0 * 255.255.0.0 U 0 0 0 ppp0
loopback localhost 255.0.0.0 UG 0 0 0 lo
default 172.16.9.52 0.0.0.0 UG 0 0 0 ppp0
|
route add -net 194.44.214.0 netmask 255.255.255.0 gw 192.168.2.1 ето путь к dns server'aм
route add -net 172.16.0.0 netmask 255.255.0.0 dev ppp0 ето туть в сеть 172.16.0.0 через ррр0
route add -host 69.64.217.209 gw 192.168.2.1 ето путь к внешнему ╕р vpn servera
а дефолтный маршрут я задал через опцию в /etc/ppp/options.MyPeer "defaultroute"
192.168.2.0 ето внутреняя сеть
Quote: | хотя 172.16.9.52 - это, скорее всего, внутренний интерфейс впн-сервера с внешним статическим адресом 69.64.217.209
|
Ти прав.
Quote: | route add -host 69.64.217.209 gw шлюз_в_подсеть 172.х.х.х
|
Разви так можно додавать маршрути ?? я зделал так route add -host 69.64.217.209 gw 192.168.2.1 -->69.64.217.209
Quote: | если у тебя доступ к впн-серверу через подсеть 172.х.х.х, тогда добавь маршрут к нему через эту подсеть так:
|
Когда поднят тунель, но вобщето доступаюсь я к нему через 192.168.2.1(gateway)
Врезультате
Code: | new root # tracepath kernel.org
1: 192.168.2.41 (192.168.2.41) 0.265ms pmtu 1404
1: 172.16.9.52 (172.16.9.52) 111.608ms
2: no reply
3: no reply
|
я что-то пропустил ?? |
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Thu Oct 13, 2005 4:37 pm Post subject: |
|
|
2 fank ОГРОМНОЕ СПАСИБО
Я ёё победил
Code: | route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.9.52 * 255.255.255.255 UH 0 0 0 ppp0
69.64.217.209.n 192.168.2.1 255.255.255.255 UGH 0 0 0 eth0
194.44.214.0 192.168.2.1 255.255.255.0 UG 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
loopback localhost 255.0.0.0 UG 0 0 0 lo |
default 172.16.9.51 0.0.0.0 UG 0 0 0 ppp0
Quote: | eth0 Link encap:Ethernet HWaddr 00:11:2F:D1:02:BE
inet addr:192.168.2.41 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:163063 errors:0 dropped:0 overruns:0 frame:0
TX packets:108829 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26429254 (25.2 Mb) TX bytes:24916924 (23.7 Mb)
Interrupt:11 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8937 (8.7 Kb) TX bytes:8937 (8.7 Kb)
ppp0 Link encap:Point-to-Point Protocol
inet addr:172.16.9.51 P-t-P:172.16.9.52 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1404 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:80 (80.0 b) TX bytes:80 (80.0 b)
|
|
|
Back to top |
|
|
d0minus Tux's lil' helper
Joined: 25 Apr 2005 Posts: 90 Location: Ukraine
|
Posted: Thu Oct 13, 2005 5:12 pm Post subject: |
|
|
Кстати fank подскажы плз хорош╕й vpn client c поддержкой ррtр[/code] |
|
Back to top |
|
|
fank l33t
Joined: 16 Oct 2004 Posts: 794 Location: Minsk, Belarus
|
Posted: Sat Oct 15, 2005 10:26 am Post subject: |
|
|
рад был помочь
не могу тебе, к сожалению, ничего особо посоветовать в плане выбора клиента
сам пользую pptpclient, вручную правил конфиги, убил много времени и сил на чтение доков, зато добился именно такого состояния соединения, какое мне нужно и не жалуюсь теперь
немножко побаиваюсь gui в этом плане, почему и сбежал с винды по причине неприятия политики тщательного упрятывания нужных настроек за красивой мордой окошек сам_знаешь_какой_корпорацией
мой совет - если есть время, почитай ман на ppp и pptp
если нет - используй гуй, вроде Kvpnc или встроенный в pptpclient |
|
Back to top |
|
|
|