View previous topic :: View next topic |
Author |
Message |
Oyst3h n00b
Joined: 12 Aug 2003 Posts: 27
|
Posted: Wed Dec 01, 2004 8:58 pm Post subject: [SOLVED]pppd / pptpclient so near to working perfectly! |
|
|
Finally, I have managed to get a working connection to the Win2k3 server at work using ppp 2.4.2 and pptpclient. Thanks to ytak for howto here.
But... I can't get my head around getting the routing and dns to update itself automatically. I'm not using the pptpconfig package (I don't have apache installed, and there's about 50Mb of dependencies to install just for a gui - so I'd rather not, if possible).
It's basically three issues that I would welcome some help with.
I've created /etc/ppp/peers/BMS with the correct params to connect to work. Now I can just run "pon BMS" or "pppd call BMS" and the VPN starts just fine. The /etc/ppp/ip-up script runs and changes my /etc/resolv.conf to use the nameservers at work. But I also need to add a static route for the work LAN (10.15.0.0/16). /etc/ppp/ip-up seems to check for a script at /etc/ppp/ip-up.local and executes this if it exists, so I have created the file /etc/ppp/ip-up.local, chmoded it executable, and added the following Code: |
#!/bin/sh
route add -net 10.15.0.0/16 ppp0
|
This should automatically create a route for the LAN on the other side of the VPN, but it doesn't. Works fine if I run it as a command once the VPN is up, but it's not running automatically. Any idea why?
Also, when I take the VPN down (kill -term [PID of pppd]) the /etc/ppp/ip-down script is supposed to reset my nameservers to their previous value, but it doesn't run. I have to manually type Code: | mv /etc/resolv.conf.pppd-backup /etc/resolv.conf | to reset things (which is exactly what /etc/pp/ip-down should be doing). If I start the pppd with the nodetach option in a separate window, the process when terminated as above produces pages of "Terminating on signal 15." followed by "Segmentation fault". I'm sure this isn't right, and is probably why /etc/ppp/ip-down isn't running, but I've no idea what to do about it.
And I can't run pppd as a user. It's setuid root, but fails to start the VPN with an error about unable to open GRE socket. This is presumably a permissions issue, but again, I have no idea what (if anything) I can do about it.
Any response welcome, even if it's just sympathy!
Last edited by Oyst3h on Fri Dec 10, 2004 2:10 pm; edited 1 time in total |
|
Back to top |
|
|
Oyst3h n00b
Joined: 12 Aug 2003 Posts: 27
|
Posted: Mon Dec 06, 2004 1:15 am Post subject: |
|
|
OK
I have made progress...
The route wasn't coming up because the ip-up script has no path defined to /sbin, so I changed the script to "/sbin/route add ..." and it now works. This is documented, but it is amazing how easy it is to miss something so small, and yet so critical!
The ip-down script is now running, because the pppd process is terminating cleanly. Re-emerged ppp with the "mppe-mppc" flag and did NOT apply the patch from http://www.polbox.com/h/hs001/. This patch seems to work, but (possibly) caused this issue, so it is not only not necessary, but not advisable to apply the ppp patch against the current ppp ebuild (2.4.2)
Still can't run pppd as non-root, however.
Code: |
anon warn[pptp_gre_bind:pptp_gre.c:82]: socket: Operation not permitted
anon fatal[main:pptp.c:251]: Cannot bind GRE socket, aborting.
|
this is the exact error that is logged. Still hoping for an explanation as to how I can maybe change a permission to allow this.... |
|
Back to top |
|
|
Oyst3h n00b
Joined: 12 Aug 2003 Posts: 27
|
Posted: Thu Dec 09, 2004 3:38 pm Post subject: |
|
|
Simple fix, and obvious now that I know.
Set pptp to be suid.
Thanks for listening! |
|
Back to top |
|
|
oldan Tux's lil' helper
Joined: 11 Dec 2003 Posts: 137 Location: Atlanta, Georgia, USA
|
Posted: Sat Dec 25, 2004 3:42 am Post subject: Re: [SOLVED]pppd / pptpclient so near to working perfectly! |
|
|
Oyst3h wrote: | But... I can't get my head around getting the routing and dns to update itself automatically. I'm not using the pptpconfig package (I don't have apache installed, and there's about 50Mb of dependencies to install just for a gui - so I'd rather not, if possible). |
That's what's stopping me from using pptpconfig too. Any ideas why emerge mistakenly thinks you need Apache to run pptpconfig?
--Oldan |
|
Back to top |
|
|
Parasietje Apprentice
Joined: 25 Jan 2004 Posts: 194
|
Posted: Sat Dec 25, 2004 2:37 pm Post subject: |
|
|
Great topic! Very helpful for the community that you updated it. Maybe you could set the [Solved] tag in your topic title? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|