[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

RE: [Openvpn-users] Up script


  • Subject: RE: [Openvpn-users] Up script
  • From: "Jérôme Seyler - @COI Informatique" <jerome.seyler@xxxxxxxx>
  • Date: Tue, 27 Sep 2005 17:02:48 +0200

Thanks Christian, but it wasn't really what I need. 
I've found the answer to my question !

To put a script, forget the "up" argument in your config file and put your
batch files as said in the install.txt of the OpenVPNGUI.

For a abc.ovpn config file, put 2 files in the config dir, which will look
like as abc_up.bat and abc_down.bat.
With : 

 - abc_up.bat : (will put a network drive on the desired directory, without
echo)
@echo off
net use Z: \\virtual_server_ip\directory /user:user pasword

 - abc_down.bat : (will disconnect the previous network drive)
@echo off
net use Z: /delete /y

I should have read it before, but I was looking only at the OpenVPN FAQ, I
had forgotten the OpenVPN-GUI documentation.
So I paste it here if it can be useful for someone else : 

 CUT (from http://openvpn.se/install.txt)
=====

Run Connect/Disconnect/Preconnect Scripts
-----------------------------------------

There are three diffrent scripts that OpenVPN GUI can execute to help
with diffrent tasks like mapping network drives.

Preconnect  If a file named "xxx_pre.bat" exist in the config folder
            where xxx is the same as your OpenVPN config file name,
            this will be executed BEFORE the OpenVPN tunnel is established.

Connect     If a file named "xxx_up.bat" exist in the config folder
            where xxx is the same as your OpenVPN config file name,
            this will be executed AFTER the OpenVPN tunnel is established.

Disconnect  If a file named "xxx_down.bat" exist in the config folder
            where xxx is the same as your OpenVPN config file name,
            this will be executed BEFORE the OpenVPN tunnel is closed.

 CUT
=====

Well explained, isn't it ? :)

See you.
Jérôme


-----Message d'origine-----
De : openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx] De la part de christian
laubscher
Envoyé : mardi 27 septembre 2005 11:53
À : openvpn-users@xxxxxxxxxxxxxxxxxxxxx
Objet : Re: [Openvpn-users] Up script

On Tue, Sep 27, 2005 at 11:30:17AM +0200, Jérôme Seyler - @COI Informatique
wrote:

[...]

> I don't know why the "VPN 1500 1545 10.0.0.6 10.0.0.5 init" arguments 
> are passed to the command line ?

maybe man openvpn, --up cmd, says:

__cut__

For --dev tun execute as:

cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [ init |
restart ]

For --dev tap execute as:

cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [ init |
restart ]

See the "Environmental Variables" section below for additional parameters
passed as environmental variables. 

__cut__



____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users