You are not logged in.

#1 2010-09-09 18:23:26

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Help with configuring my ISP on Linux via PPTP

Hello,

my new ISP uses PPTP/VPN as a connecting method. It's pretty simple to configure it on windows, check this:

http://portal.bnet.hr/ZG/windows-xp.htm (translate from croatian to english with google translate but it's pretty self-explanatory in any language).

Now, I'm trying to setup the same connection on Linux. Here's what I have done so far.
Note, pptpclient is installed.
Second note, zg.xcarnet.xnet.hr translates to 10.64.0.1 inside my ISP.

First, I get an IP via dhcpcd so I can access external ISP IPs.

[badc0ffee ~]$ sudo dhcpcd eth0
dhcpcd[6774]: version 5.2.7 starting
dhcpcd[6774]: eth0: rebinding lease of 10.63.205.35
dhcpcd[6774]: eth0: acknowledged 10.63.205.35 from 83.139.64.71
dhcpcd[6774]: eth0: checking for 10.63.205.35
dhcpcd[6774]: eth0: leased 10.63.205.35 for 43200 seconds
dhcpcd[6774]: forked to background, child pid 6795

Now I get this routing table:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.63.204.0     *               255.255.252.0   U     202    0        0 eth0
default         10.63.204.1     0.0.0.0         UG    202    0        0 eth0

My /etc/ppp/ip-up.d/start script:

#!/bin/sh
route del -host $5 gw 0.0.0.0 dev $1
route add -host $5 gw 10.63.204.1 dev eth0
route add default gw $4
route del default gw 10.63.204.1

My /etc/ppp/ip-down.d/stop script:

#!/bin/sh
route del -host $5 gw 10.63.204.1 dev eth0
route add default gw 10.63.204.1

My /etc/ppp/peers/xcarnet file:

pty "pptp 10.64.0.1 --nolaunchpppd"
file /etc/ppp/options.pptp
remotename PPTP
nodefaultroute
usepeerdns
debug
name xy12345@fer.hr
ipparam xcarnet

My /etc/ppp/pap-secrets file:

xy12345@fer.hr PPTP mypassword

Then, I issue a command for connecting via pptp, and I get this:

[badc0ffee ~]$ sudo pon xcarnet debug dump logfd 2 nodetach 
pppd options in effect:
debug debug        # (from command line)
nodetach        # (from command line)
logfd 2        # (from command line)
dump        # (from command line)
noauth        # (from /etc/ppp/options.pptp)
refuse-chap        # (from /etc/ppp/options.pptp)
refuse-mschap        # (from /etc/ppp/options.pptp)
refuse-eap        # (from /etc/ppp/options.pptp)
name xy12345@fer.hr        # (from /etc/ppp/peers/xcarnet)
remotename PPTP        # (from /etc/ppp/peers/xcarnet)
        # (from /etc/ppp/options.pptp)
pty pptp 10.64.0.1 --nolaunchpppd        # (from /etc/ppp/peers/xcarnet)
crtscts        # (from /etc/ppp/options)
        # (from /etc/ppp/options)
asyncmap 0        # (from /etc/ppp/options)
mtu 1400        # (from /etc/ppp/options)
lcp-echo-failure 4        # (from /etc/ppp/options)
lcp-echo-interval 30        # (from /etc/ppp/options)
hide-password        # (from /etc/ppp/options)
ipparam xcarnet        # (from /etc/ppp/peers/xcarnet)
nodefaultroute        # (from /etc/ppp/peers/xcarnet)
proxyarp        # (from /etc/ppp/options)
usepeerdns        # (from /etc/ppp/peers/xcarnet)
nobsdcomp        # (from /etc/ppp/options.pptp)
nodeflate        # (from /etc/ppp/options.pptp)
noipx        # (from /etc/ppp/options)
using channel 8
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x7f26e040> <pcomp> <accomp>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
Waiting for 1 child processes...
  script pptp 10.64.0.1 --nolaunchpppd, pid 5342
sending SIGTERM to process 5342

In other words, a timeout. This is a routing table after the command has finished:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.0.1       10.63.204.1     255.255.255.255 UGH   0      0        0 eth0
10.63.204.0     *               255.255.252.0   U     202    0        0 eth0
default         10.63.204.1     0.0.0.0         UG    202    0        0 eth0

I really can't find the problem, I'm very inexperienced when it comes to networking. I'd appreciate any help you can offer.

Regards,

karabaja4

Last edited by karabaja4 (2010-09-09 18:27:48)

Offline

#2 2010-09-09 22:58:33

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: Help with configuring my ISP on Linux via PPTP

tcpdump, the last few packages appear when connection is timed out and shutting down.

[deadbeef ~]$ sudo tcpdump -i eth0 -s 0 tcp port 1723 or proto 47 > dumpfiltered.txt
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
22:12:30.469612 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [s], seq 3663717443, win 5840, options [mss 1460,sackOK,TS val 4294964464 ecr 0,nop,wscale 6], length 0
22:12:30.608385 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [S.], seq 1544764806, ack 3663717444, win 4128, options [mss 536], length 0
22:12:30.608404 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [.], ack 1, win 5840, length 0
22:12:30.608863 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [P.], seq 1:157, ack 1, win 5840, length 156: pptp CTRL_MSGTYPE=SCCRQ PROTO_VER(1.0) FRAME_CAP(AS) BEARER_CAP(DA) MAX_CHAN(65535) FIRM_REV(1) HOSTNAME(local) VENDOR(cananian)
22:12:30.626765 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [P.], seq 1:157, ack 157, win 3972, length 156: pptp CTRL_MSGTYPE=SCCRP PROTO_VER(1.0) RESULT_CODE(1) ERR_CODE(0) FRAME_CAP(AS) BEARER_CAP(DA) MAX_CHAN(0) FIRM_REV(4608) HOSTNAME(CN-XCARNet-03-RO) VENDOR(Cisco Systems, Inc.)
22:12:30.626779 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [.], ack 157, win 6432, length 0
22:12:31.608811 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [P.], seq 157:325, ack 157, win 6432, length 168: pptp CTRL_MSGTYPE=OCRQ CALL_ID(0) CALL_SER_NUM(0) MIN_BPS(2400) MAX_BPS(10000000) BEARER_TYPE(Any) FRAME_TYPE(E) RECV_WIN(3) PROC_DELAY(0) PHONE_NO_LEN(0) PHONE_NO() SUB_ADDR()
22:12:31.642301 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [.], ack 325, win 3804, length 0
22:13:06.733356 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [P.], seq 325:341, ack 157, win 6432, length 16: pptp CTRL_MSGTYPE=CCRQ CALL_ID(0)
22:13:06.733407 IP 10.63.207.31.44466 > 10.64.0.1.pptp: Flags [F.], seq 341, ack 157, win 6432, length 0
22:13:06.749673 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [.], ack 325, win 3804, length 0
22:13:06.749700 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [.], ack 342, win 3788, length 0
22:13:06.749748 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [.], ack 342, win 3788, length 0
22:13:06.749884 IP 10.64.0.1.pptp > 10.63.207.31.44466: Flags [R], seq 1544764963, win 3788, length 0
14 packets captured
14 packets received by filter
0 packets dropped by kernel

When LCP ConfReq packages are "sent", tcpdump doesn't show anything.

Last edited by karabaja4 (2010-09-10 23:20:34)

Offline

#3 2010-09-10 23:17:10

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,001
Website

Re: Help with configuring my ISP on Linux via PPTP

I've come to conclusion that GRE packages aren't even sent. tcpdump or wireshark don't show a single GRE package. Let's see what does pptpclient documentation say on how to fix that?

No GRE packets transmitted by client:
http://pptpclient.sourceforge.net/howto … _no_gre_tx

1. turn off sync and try again - sync is off already
2. iptables or ipchains rules which block GRE transmission - I don't use either of those.
(3.) I also don't have any kind of firewall or another device in the network.

I'm going crazy. I tried just about every option in /etc/ppp/options, it doesn't seem to make a difference. The connection works in Windows XP.

Please, does anyone have any idea?

Offline

Board footer

Powered by FluxBB