[pptp-server] Scripts: ip-up, ip-down.

REMI COHEN-SCALI REMI.COHEN-SCALI at Sun.COM
Tue Oct 24 10:36:36 CDT 2000


Dmitry Tolpanov wrote:
> 
> Hi, all.
> 
>  I'm using PPTP and need to start scripts when IP link is up or down.
> I've read man and found that i need to use ip-up and up-down scripts.
> I've made them. Add +x. But nothing has happend.
>  As i understand pppd didn't sart them at all (also i didn't found
> string about starting these scripts in logs).
> 
> Is there anithing else what i need to do to make them working.
> Thanks.
> 
> Dmitry.
> 
> _______________________________________________
> pptp-server maillist  -  pptp-server at lists.schulte.org
> http://lists.schulte.org/mailman/listinfo/pptp-server
> List services provided by www.schulteconsulting.com!
Hie

I ran in the same problem as yours when I used demand dialing uplink &
DNS. I was needed a script to reload DNS config at LCP link startup. PPP
do not support that directly but give support for plugins and phase
hooks. I wrote a little ppp plugin misnamed demand_script (a better name
would have been phasehook_script) which enable the user to run a script
when PPP phase change. Now I have ADSL and I used it successfully since
several months to monitor the connection. Several other peoples use it
in a production environement with success and I gave them some support.
I can even give you support by mail if you need to.
I tried to write it taking into account security threats (buffer
overrun, etc...).
Their is two run mode, synchronous script run (ppp wait for script end)
or asynchronous script run (ppp is asynchronously notified of script
death through a sigchld signal handler).
This plugin exists at now for ppp-2.3.10 and ppp-2.3.11. Other ppp
version should be trivial to do. Plugins are also available as rpm.
I also patched PPP to have an easier way of loading plugins. You can the
plugin without the patched PPP (just compile plugin src in plugin dir of
ppp)
Have a look at:

http://www.rcsnet.net/pub/
ftp://ftp.rcsnet.net/pub/

You should find.
demand_script.c		the source for plugin


demand_script-0.3-ppp-2.3.11.patch	patch for ppp src tree including
plugin source
ppp-2.3.11-3.src.rpm			src redhat package for patched ppp 2.3.11 with
plugin
ppp-2.3.11-3.i386.rpm			binary redhat package for patched ppp
ppp-plugins-2.3.11-3.i386.rpm		binary redhat package for plugins
demand_script.so			binary plugin (shared lib)
demand_script.c				source of plugin
README.demand_script			text version of this
README.demand_script.html		html version of this

Hope this help. Please tell me if you use it successfully, and you can
contact me for any question.
Good luck

-- 
   _/_/_/   _/    _/  _/      /      Remi Cohen-Scali
   _/      _/    _/  _/_/   _/       Development engineer -
International Center for Network Computing
  _/_/_/  _/    _/  _/  _/ _/        Network Service Provider Division
     _/  _/    _/  _/   _/_/         Phone:     +33-139-447-509  x44509
_/_/_/   _/_/_/   _/     _/          E-mails: Remi.Cohen-Scali at Sun.COM
M  I  C  R  O  S  Y  S  T  E  M  S            Remi at Cohen-Scali.COM
                                     WAPmail:
Remi.CohenScali at Itineris.Net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2110 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.schulte.org/mailman/private/pptp-server/attachments/20001024/d32134d2/attachment.bin>


More information about the pptp-server mailing list