Bug 190332

Summary: net/pptpclient fails with "/bin/ip: not found"
Product: Ports & Packages Reporter: Grant Watson <grant_watson>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: miwi, pi
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Grant Watson 2014-05-28 08:30:00 UTC
Having given the appropriate definition in /etc/ppp/ppp.conf, I run the pptp command to create a tunnel.  I get an error about failing to find the Linux ip command and the tunnel is not created:

root@dweorh:/home/gdwatson # pptp 1.2.3.4 VPNName
/bin/ip: not found
/bin/ip: not found

ifconfig reveals no tunnel.

Fix: 

The upstream web site advertises Free/Net/Open-BSD support, so my (perhaps naive) expectation is that there's a build problem somewhere and not an undeclared upstream dependency on Linux-only network utilities.
How-To-Repeat: Install pptpclient, put PPTP VPN connection information in /etc/ppp/ppp.conf, and run pptp with IP address and name of the connection.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-07-22 20:04:49 UTC
This port has no maintainer.
What do you want to do with this PR?
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-17 19:55:17 UTC
Created attachment 162164 [details]
patch
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-17 19:56:45 UTC
/bin/ip is the linux 'do all ip related stuff like adding routes etc' command.
 
It is called with hardcoded parameters in three places in routing.c:
 
./routing.c:  snprintf(buf, 255, "%s route get %s", IP_BINARY, ip);
./routing.c:  snprintf(buf, 255, "%s route replace %s", IP_BINARY, route);
./routing.c:  snprintf(buf, 255, "%s route delete %s", IP_BINARY, route);
 
To allow it to work, some patch is needed that adapts to the FreeBSD
way of adding routes. 'get' and 'delete' probably work if we replace
/bin/ip in Makefile line 10 with /sbin/route. 'replace' is probably
more difficult to fix, but I'm not sure it's used at all.
 
Besides all this, the PPTP protocol was declared insecure and unfixable
a long time ago.
 
http://www.howtogeek.com/211329/which-is-the-best-vpn-protocol-pptp-vs.-openvpn-vs.-l2tpipsec-vs.-sstp/

Please test the attached patch and report back if it works for you.
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2017-03-04 14:43:28 UTC
Hi,

Is this PR still relevant?
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2017-03-04 15:17:29 UTC
Even if pptp is insecure, it's helpful to have some tool to interoperate with old PPTP systems. So, yes, it's still relevant, but not very important.
Comment 6 Martin Wilke freebsd_committer freebsd_triage 2017-03-04 18:16:04 UTC
Hi Kurt,

Then please commit the patch if it works for you and close the pr.
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2017-03-04 18:39:51 UTC
Was fixed in r378485:

https://lists.freebsd.org/pipermail/svn-ports-all/2015-February/084683.html