IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Working OpenVPN 2.0.1 rc3 Plugin, Plugin for OpenVPN 2.0.1 rc3 (beta 1)
MrXP
post Jun 25 2005, 12:57 AM
Post #1


Freaky Ass Mo-Fo!
****

Group: Members
Posts: 610
Joined: 19-May 03
From: Houston, TX (USA)
Member No.: 788



I have made a plugin for OpenVPN 2.0.1 rc3 download here and uses a RamDrive to function correctly.

Working Freeware/OpenSource OpenVPN Plugin for BartPE 3.1.4 & XPE 1.0.4 running on XP SP2 (Not tested with Nu2menu) Sorry I dont use Barts Nu2Menu so I dont know how or if it will even work with the GUI app since it runs in the system tray of Explorer or XPE.

This is my Beta version of this plugin and allthough it should work on most bartpe builds I cant promis it will work on yours without making some changes.

Requires the OpenVPN GUI made by Mathias Sundman.
Download Here
You will need to put the gui and libeay32.dll in the plugin\openvpn\files\ folder.

Since this plugin is not localized if your using 2003 as your build source you may need to edit all X:\ feilds in openvpn.inf D:\ or what ever your bootdrive letter is as this plugin is not localized.

Copy all files from your current installation under normal windows (normaly C:\Program Files\OpenVPN) to a folder called FILES in your plugin folder.

One issue I have is this plugin did not work when setting enviroment vars to %SystemDrive% or %RamDrv% so I used a static X:\ for CD drive and B:\ for the Ram Drive.

This plugin creates all the registry entries but does not install the NIC driver until it is installed (icon on xpe desktop). When Installer on desktop is launched it will also create and copy all X:\Programs\OpenVPN\Config\*.* to B:\ and put a VPN GUI in the System Tray.

You should make sure to include your CONFIG folder that contains your .ovpn files so that the GUI will work correctly.

It does install openvpnserv.exe (when installed from XPE desktop) as a system service but does not start it automaticly (Use the GUI)

openvpn.inf
CODE
; openvpn.inf
; PE Builder v3 plug-in INF file for OpenVPN 2.0.1 rc3
; Created by MrXP

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="OpenVPN 2.0.1 rc3"
Enable=1

[WinntDirectories]
a="Programs\OpenVPN",2

[SourceDisksFiles]
"files"=a,,4

[SourceDisksFolders]
"files"=a

;XPE Support
[Software.AddReg]
0x2,"Sherpya\XPEinit\Desktop","Install OpenVPN","%SystemDrive%\Programs\OpenVPN\Bin\addtap.bat||%SystemDrive%\Programs\OpenVPN\openvpn.ico"
0x2,"Sherpya\XPEinit\Programs","OpenVPN\Install OpenVPN","%SystemDrive%\Programs\OpenVPN\Bin\addtap.bat||%SystemDrive%\Programs\OpenVPN\openvpn.ico"
0x2,"Sherpya\XPEinit\Programs","OpenVPN\Remove All OpenVPN Adapters from system","%SystemDrive%\Programs\OpenVPN\Bin\deltapall.bat||%SystemDrive%\Programs\OpenVPN\openvpn.ico"
0x2,"Sherpya\XPEinit\Programs","OpenVPN\Add OpenVPN Adapter","%SystemDrive%\Programs\OpenVPN\Bin\addnic.bat||%SystemDrive%\Programs\openvpn\openvpn.ico"
0x2,"Sherpya\XPEinit\Programs","OpenVPN\View OpenVPN config file options","%SystemDrive%\Programs\OpenVPN\openvpn.txt"
0x2,"Sherpya\XPEinit\Programs","OpenVPN\Generate OpenVPN Encryption Key to RamDisk","%SystemDrive%\Programs\OpenVPN\genkey.cmd||%SystemDrive%\Programs\openvpn\OpenVPN.ico"

; OpenVPN GUI Reg Entries
[Software.AddReg]
0x0,"OpenVPN-GUI"
0x1,"OpenVPN-GUI","config_dir","B:\OPENVPN"
0x1,"OpenVPN-GUI","config_ext","ovpn"
0x1,"OpenVPN-GUI","exe_path","X:\Programs\OpenVPN\bin\openvpn.exe"
0x1,"OpenVPN-GUI","log_dir","B:\Logs"
0x1,"OpenVPN-GUI","log_append","1"
0x1,"OpenVPN-GUI","priority","NORMAL_PRIORITY_CLASS"
0x1,"OpenVPN-GUI","log_viewer","X:\i386\System32\notepad.exe"
0x1,"OpenVPN-GUI","editor","X:\i386\system32\notepad.exe"
0x1,"OpenVPN-GUI","allow_edit","1"
0x1,"OpenVPN-GUI","allow_service","0"
0x1,"OpenVPN-GUI","allow_password","1"
0x1,"OpenVPN-GUI","allow_proxy","1"
0x1,"OpenVPN-GUI","service_only","0"
0x1,"OpenVPN-GUI","show_balloon","1"
0x1,"OpenVPN-GUI","silent_connection","0"
0x1,"OpenVPN-GUI","show_script_window","1"
0x1,"OpenVPN-GUI","disconnect_on_suspend","1"
0x1,"OpenVPN-GUI","passphrase_attempts","3"
0x1,"OpenVPN-GUI","connectscript_timeout","15"
0x1,"OpenVPN-GUI","disconnectscript_timeout","10"
0x1,"OpenVPN-GUI","preconnectscript_timeout","10"

; This option disabled the unsigned driver prompt when installing the
; OpenVPN NIC driver under BartPE
[Default.AddReg]
0x4,"Software\Microsoft\Driver Signing","Policy",0x0

[Software.AddReg]
0x3,"Microsoft\Windows\CurrentVersion\Setup","PrivateHash",22,9e,53,3e,5d,08,ab,c8,77,1d,b9,d0,e6,06,a8,06

[Software.AddReg]
0x1, "Classes\.ovpn","","OpenVPNFile"
0x0, "Classes\OpenVPNFile\DefaultIcon"
0x1, "Classes\OpenVPNFile\shell\open\command","","notepad.exe "%1""
0x1, "Classes\OpenVPNFile\shell\run\command","",""X:\Programs\OpenVPN\bin\openvpn.exe" --pause-exit --config "%1""
0x1, "Classes\OpenVPNFile\shell\run","","Start OpenVPN on this config file"
0x1, "Classes\OpenVPNFile\shell","","open"
0x1, "Classes\OpenVPNFile\DefaultIcon","","X:\Programs\OpenVPN\openvpn.ico,0"
0x1, "Classes\OpenVPNFile","","OpenVPN Config File"
0x1, "Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN","DisplayName","OpenVPN 2.0.1_rc3"
0x1, "Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN","UninstallString","X:\Programs\OpenVPN\Uninstall.exe"
0x1, "Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN","DisplayIcon","X:\Programs\OpenVPN\openvpn.ico"
0x1, "Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN","DisplayVersion","2.0.1_rc3"
0x1, "OpenVPN","","X:\Programs\OpenVPN"
0x1, "OpenVPN","config_dir","B:\OVPNVPN"
0x1, "OpenVPN","config_ext","ovpn"
0x1, "OpenVPN","exe_path","X:\Programs\OpenVPN\bin\openvpn.exe"
0x1, "OpenVPN","log_dir","B:\logs"
0x1, "OpenVPN","priority","NORMAL_PRIORITY_CLASS"
0x1, "OpenVPN","log_append","0"

[Default.AddReg]
0x1, "Environment","PATH","X:\Programs\OpenVPN\bin"


genkey.cmd put in FILES folder
CODE
@Echo off
"%SystemDrive%\Programs\OpenVPN\bin\openvpn.exe" --pause-exit --verb 3 --genkey --secret "B:\OpenVPN\key.txt"


addnic.cmd put in FILES\bin folder
CODE
@Echo off
"X:\Programs\OpenVPN\bin\tapinstall.exe" install "X:\i386\inf\OemWin2k.inf" tap0801


addtap.bat replace the one in FILES\bin folder
CODE
@Echo off
rem Add a new TAP-Win32 virtual ethernet adapter
"X:\Programs\OpenVPN\bin\tapinstall.exe" install "X:\i386\inf\OemWin2k.inf" tap0801
"X:\Programs\OpenVPN\bin\openvpnserv.exe" -install
MD %TEMP%\OPENVPN
XCOPY /y /v X:\Programs\OpenVPN\Config\*.* %TEMP%\OpenVPN
exit


deltapall.bat replace the one in FILES\bin folder
CODE
echo WARNING: this script will delete ALL TAP-Win32 virtual adapters (use the device manager to delete adapters one at a time)
pause
"X:\Programs\OpenVPN\bin\tapinstall.exe" remove tap0801
pause


Good luck and let me know some feed back

MrXP
Go to the top of the page
 
+Quote Post
rasa
post Jun 30 2005, 10:12 PM
Post #2


Member
**

Group: Members
Posts: 57
Joined: 21-February 04
From: Santa Monica, CA USA
Member No.: 4,317



@MrXP

You list X:\i386\inf\OemWin2k.inf, but it's in X:\Programs\OpenVPN\driver.

Fix the .bat file, or fix the .inf file to copy it?
Go to the top of the page
 
+Quote Post
MrXP
post Jun 30 2005, 10:16 PM
Post #3


Freaky Ass Mo-Fo!
****

Group: Members
Posts: 610
Joined: 19-May 03
From: Houston, TX (USA)
Member No.: 788



When I tried using the driver INF located in the Driver folder it failed when installing the NIC driver. Not sure why??? Plus when pebuilder parses the plugin INF it copies OemWin2k.inf to folder ID 22 wich is \i386\inf

MrXP

QUOTE (rasa @ Jun 30 2005, 10:12 PM)
@MrXP

You list X:\i386\inf\OemWin2k.inf, but it's in X:\Programs\OpenVPN\driver.

Fix the .bat file, or fix the .inf file to copy it?
*
Go to the top of the page
 
+Quote Post
MrXP
post Jun 30 2005, 10:24 PM
Post #4


Freaky Ass Mo-Fo!
****

Group: Members
Posts: 610
Joined: 19-May 03
From: Houston, TX (USA)
Member No.: 788



Im working on a much cleaner plugin for this that I will be posting in the next week or so. This is just to give anyone (myself) a basic working plugin.

MrXP
Go to the top of the page
 
+Quote Post
BlueMonkey
post Jul 1 2005, 02:29 AM
Post #5


Silver Member
***

Group: Members
Posts: 221
Joined: 27-May 05
Member No.: 11,848



Can someone explain what is wrong with the MS Built-in client?

Security? huh.gif
Go to the top of the page
 
+Quote Post
rasa
post Jul 2 2005, 01:23 AM
Post #6


Member
**

Group: Members
Posts: 57
Joined: 21-February 04
From: Santa Monica, CA USA
Member No.: 4,317



QUOTE (MrXP @ Jun 30 2005, 07:24 PM)
Im working on a much cleaner plugin for this that I will be posting in the next week or so. This is just to give anyone (myself) a basic working plugin.
*

@MrXP

I got inspired from your posting and created a full plugin for OpenVPN. It's available at http://www.smithii.com/files/plugins/openvpn.zip.

I also created an AutoRun plugin for OpenVPN here: http://www.smithii.com/files/plugins/autorun_openvpn.zip.

One trick i used was to add a TAP network connection for each .ovpn file in the config directory.

I hope you find this work helpful, and that I didn't duplicate your efforts.
Go to the top of the page
 
+Quote Post
MrXP
post Jul 2 2005, 11:05 AM
Post #7


Freaky Ass Mo-Fo!
****

Group: Members
Posts: 610
Joined: 19-May 03
From: Houston, TX (USA)
Member No.: 788



QUOTE (BlueMonkey @ Jul 1 2005, 02:29 AM)
Can someone explain what is wrong with the MS Built-in client?

Security?  huh.gif
*


I havnt even really tried the built in MS client. One of the reason I like this VPN solution is that its very simple yet secure and provides Server and Client side support as well as lets you change the TCP/UDP port that the server listens on as well as go through a HTTP proxy wich has come in handy on many acations for me. Im not 100% but I dont think the Built in MS Client lets you change/do this.

MrXP
Go to the top of the page
 
+Quote Post
cantina
post Nov 14 2005, 09:37 PM
Post #8


Newbie
*

Group: Members
Posts: 3
Joined: 14-November 05
Member No.: 15,470



QUOTE (MrXP @ Jul 2 2005, 01:05 PM)
I havnt even really tried the built in MS client. One of the reason I like this VPN solution is that its very simple yet secure and provides Server and Client side support as well as lets you change the TCP/UDP port that the server listens on as well as go through a HTTP proxy wich has come in handy on many acations for me. Im not 100% but I dont think the Built in MS Client lets you change/do this.

MrXP
*





Can I ask you a question, Im new with bartpe, when i try to install the tap device doesn´t do anything, and by doing the command line pronpt, it says that tapinstall failed,
so I tried to install the tap driver by hand doing:
"pathto:tapinstall.exe" install "pathto:oemwin2k.inf" tap0801
and I dont know why it says "failed", I cant install de tap device.

In an xp or win2k installed on the hard disk it works fine installing the driver in this way.

Am I missing something? what I am doing wrong?
May be you can help me.

Thanks in advance.
Pablo - Cantina
Go to the top of the page
 
+Quote Post
entityitalia.it
post May 21 2006, 12:32 PM
Post #9


Newbie
*

Group: Members
Posts: 2
Joined: 21-May 06
Member No.: 19,464



QUOTE (cantina @ Nov 15 2005, 04:37 AM) *
Can I ask you a question, Im new with bartpe, when i try to install the tap device doesn´t do anything, and by doing the command line pronpt, it says that tapinstall failed,
so I tried to install the tap driver by hand doing:
"pathto:tapinstall.exe" install "pathto:oemwin2k.inf" tap0801
and I dont know why it says "failed", I cant install de tap device.

In an xp or win2k installed on the hard disk it works fine installing the driver in this way.

Am I missing something? what I am doing wrong?
May be you can help me.

Thanks in advance.
Pablo - Cantina



I encounter the same problem, using PeSetEnv, or without, running by hand creation of tap device or automatically ...

what's wrong ??

Thanks In advance
Best Regards
Go to the top of the page
 
+Quote Post
cantina
post Nov 20 2007, 05:40 PM
Post #10


Newbie
*

Group: Members
Posts: 3
Joined: 14-November 05
Member No.: 15,470



Here is the solution
http://smithii.com/node/16

This post has been edited by Ed_P: Nov 20 2007, 11:40 PM
Reason for edit: Removed needless quote. Please use the Add Reply button.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2nd September 2010 - 04:14 PM