Help With pptpclient Setup

Drew Tomlinson drew at mykitchentable.net
Wed May 19 15:59:39 UTC 2010


I'm using FBSD 8.0-STABLE and trying to connect to a Cisco VPN at work.  
Windows PCs connect with the basic Microsoft dial-up networking client.  
Thus I assume pptpclient is my answer for FBSD.

My work network is a class B but it's used as 254 class C networks.  The 
vpn server address is part of that class B network.  The VPN server 
gives me a class C address.  Let's use these addresses as an example:

10.0.18.10 is the VPN server
10.0.206.150/24 is the IP address my client will be given
10.0.0.0/16 is my entire work network.

I've followed examples at http://www.freebsddiary.org/pptp.php and 
http://www.freebsd.org/doc/en/books/handbook/userppp.html.  My ppp.conf 
file looks like this:

default:
   set log Phase Chat LCP IPCP CCP tun command
   ident user-ppp VERSION (built COMPILATIONDATE)

WORK:
  set authname myusername
  set authkey mypassword
  set timeout 0
  set ifaddr 0 0
  add 10.0.206.0/24 HISADDR
  alias enable yes

/var/log/message shows this when trying to make a connection:

May 19 08:50:34 vm pptp[89300]: anon log[main:pptp.c:314]: The 
synchronous pptp option is NOT activated
May 19 08:50:34 vm pptp[89305]: anon log[ctrlp_rep:pptp_ctrl.c:251]: 
Sent control packet type is 1 'Start-Control-Connection-Request'
May 19 08:50:34 vm pptp[89305]: anon log[ctrlp_disp:pptp_ctrl.c:739]: 
Received Start Control Connection Reply
May 19 08:50:34 vm pptp[89305]: anon log[ctrlp_disp:pptp_ctrl.c:773]: 
Client connection established.
May 19 08:50:35 vm pptp[89305]: anon log[ctrlp_rep:pptp_ctrl.c:251]: 
Sent control packet type is 7 'Outgoing-Call-Request'
May 19 08:50:35 vm pptp[89305]: anon log[ctrlp_disp:pptp_ctrl.c:858]: 
Received Outgoing Call Reply.
May 19 08:50:35 vm pptp[89305]: anon log[ctrlp_disp:pptp_ctrl.c:897]: 
Outgoing call established (call ID 0, peer's call ID 34636).
May 19 08:50:36 vm kernel: tun0: link state changed to UP
May 19 08:50:36 vm ppp[89300]: tun0: Warning: The alias command is 
deprecated
May 19 08:51:35 vm pptp[89305]: anon log[logecho:pptp_ctrl.c:677]: Echo 
Request received.
May 19 08:51:35 vm pptp[89305]: anon log[ctrlp_rep:pptp_ctrl.c:251]: 
Sent control packet type is 6 'Echo-Reply'

The above lasts for a minute or two and then:

May 19 08:52:56 vm pptp[89305]: anon 
log[pptp_read_some:pptp_ctrl.c:551]: read error: Operation timed out
May 19 08:52:56 vm pptp[89305]: anon 
log[callmgr_main:pptp_callmgr.c:258]: Closing connection (shutdown)
May 19 08:52:56 vm pptp[89305]: anon 
log[pptp_send_ctrl_packet:pptp_ctrl.c:622]: write error: Broken pipe
May 19 08:52:56 vm pptp[89305]: anon 
log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
May 19 08:52:56 vm pptp[89305]: anon 
log[pptp_read_some:pptp_ctrl.c:551]: read error: Bad file descriptor
May 19 08:52:56 vm ppp[89300]: tun0: Warning: deflink: Unable to set 
physical to speed 0
May 19 08:52:56 vm ppp[89300]: tun0: Warning: deflink: Unable to set 
physical to speed 0
May 19 08:52:56 vm ppp[89300]: tun0: Warning: deflink: tcsetattr: Unable 
to restore device settings
May 19 08:52:56 vm kernel: tun0: link state changed to DOWN
May 19 08:52:56 vm kernel: pid 89305 (pptp), uid 0: exited on signal 11 
(core dumped)

Before core dump above, route table shows:

# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.2        UGS         8  2203286    em0
127.0.0.1          link#6             UH          0    44531    lo0
10.0.18.10      link#7             UHS         0   176240   tun0
10.0.206.0/24   159.145.18.10      UGS         0        0   tun0
10.0.206.150    link#7             UHS         0        0    lo0
192.168.1.0/24     link#2             U           6 10627552    em0
192.168.1.6        link#2             UHS         0        0    lo0

And ifconfig shows tun0 as:

tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1498
         options=80000<LINKSTATE>
         inet 10.0.206.150 --> 10.0.18.10 netmask 0xffffffff
         Opened by PID 89300

So what am I doing wrong?  I suspect routing is an issue.  Wouldn't I 
need a route that points all 10.0.0.0/16 traffic to tun0 but another 
route that specifically sends 10.0.18.10/32 to my default gateway of 
192.168.1.2?  And if so, how do I properly specify that in my ppp.conf?

Thanks,

Drew







More information about the freebsd-questions mailing list