Bug 190332 - net/pptpclient fails with "/bin/ip: not found"
Summary: net/pptpclient fails with "/bin/ip: not found"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-28 08:30 UTC by Grant Watson
Modified: 2017-03-04 18:39 UTC (History)
2 users (show)

See Also:


Attachments
patch (1.57 KB, patch)
2015-10-17 19:55 UTC, Kurt Jaeger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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