Running a down script prior to route del

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
grlindsay
OpenVpn Newbie
Posts: 1
Joined: Thu Dec 16, 2010 8:34 pm

Running a down script prior to route del

Post by grlindsay » Thu Dec 16, 2010 8:37 pm

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

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Running a down script prior to route del

Post by krzee » Mon Jan 10, 2011 9:16 pm

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

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Running a down script prior to route del

Post by janjust » Fri Feb 11, 2011 11:26 am

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

eric66300
OpenVPN Power User
Posts: 57
Joined: Fri Apr 15, 2011 12:05 pm

Re: Running a down script prior to route del

Post by eric66300 » Wed Oct 12, 2011 5:38 am

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?

Post Reply