Page 1 of 1

Running a down script prior to route del

Posted: Thu Dec 16, 2010 8:37 pm
by grlindsay
I am running a script that will register and remove my machines to my internal DNS. It runs fine with the up command but when I try to run the down with down-pre I notice that the script isn't working due to the routes being deleted prior to the script being run.

Is there any way to automate a script to run prior to the deleting of routes?

Thanks
Garrett

Re: Running a down script prior to route del

Posted: Mon Jan 10, 2011 9:16 pm
by krzee
if the client registers over the vpn, could you make it so the server registers / and unregisters the client? this would be in --client-connect and --client-disconnect scripts

Re: Running a down script prior to route del

Posted: Fri Feb 11, 2011 11:26 am
by janjust
I fully agree with krzee's posting but if you must run a script before the tun/tap device is closed, use

Code: Select all

  down ..../script
  down-pre
HTH,

JJK

Re: Running a down script prior to route del

Posted: Wed Oct 12, 2011 5:38 am
by eric66300
Hi

got little bit confused

script-security 2
client_connect ..../script
client_disconnect .../script
got those 2 on server but the problem was
client_disconnect script took lot of time before executing or never executed at all

how to work this disconnect script upon user get disconnected from user?