Welcome! Log In Create A New Profile

Advanced

vpn connection

Posted by wduser 
vpn connection
June 18, 2019 01:26PM
Hi,

I need an application to be able to write into a section of an other server that is protected ( vpn ) I tried:

- NetOpenRemoteAccess (But that doesnot seem te work )

Anyone ever done this ??

Regards
pao
Re: vpn connection
June 18, 2019 01:32PM
What is the type of VPN connection to use? IPSEC,HTTPS,L2TP?

Regards

Paulo Oliveira
Al
Re: vpn connection
June 18, 2019 02:01PM
Hello,

Just a bit short on details with your request - the problem could be in the code you haven't posted or the version of whatever PCSoft product you might be using.

Regards
Al
RVDM
Re: vpn connection
June 18, 2019 02:23PM
HiSorry,

I use windev version 23 for this project.

I Saw this in the Help: " Managing the remote accesses"

I tried netopenremoteacces() But that doesnot seem to work.

They talk about vpn in this help tekst but there is no example

My code so far:

sResultaat is string
sResultaat = TableToText(TABLE_Bag_Import,taNoTitle,"|")
IF NetOpenRemoteAccess("\\10.56.6.2\Username","password",True)<> 0 THEN
Error("could not make connection ")

END
pao
Re: vpn connection
June 18, 2019 03:09PM
You have to define the VPN connection in windows and only after that you can use the NetOpenRemoteAccess.

Check the vpn connections defined in your windows with NetListRemoteAccess()

I use it a lot with one L2TP VPN and it works, my code to connect to the VPN is:
wopen is int
wopen=NetOpenRemoteAccess("MY_VPN_CONNECTION","my_vpn_password")
IF wopen<>0 THEN
Error(NetMsgError(wopen))
RETURN
END

Info("OK")

I have to store the user in the VPN definition of windows along with all the other parameters.

Regards

Paulo Oliveira



Edited 1 time(s). Last edit at 06/18/2019 03:11PM by pao.
Al
Re: vpn connection
June 18, 2019 03:11PM
Hello

I haven't used the command but just from reading it, it looks like the parameter should be the name of a vpn connection already established in Windows
To access a remote server by vpn you would normally create a vpn chanel first in Windows - ControlPanel > Network & Sharing > Setup a new connection

What vpn software was used to create the vpn - Cisco , Openvpn ?
Usually they have software that sets up the connection


From the Windev Help

// Starts the Internet connection on a PC
// The name of the connection to use is the one defined in the list of
// connections of the PC (control panel).

Report is int = NetOpenRemoteAccess("Connection_LiveBox")


Regards
Al
Al
Re: vpn connection
June 18, 2019 03:13PM
Hello Paulo

Beat me by that much smiling smiley

I must have been typing while you were posting.


Regards
Al
Ola
Re: vpn connection
June 20, 2019 03:50PM
I'd call it a draw. Paulo was faster, but Al was more thorough, telling also to vpn-newbies how to do a new vpn connectionsmiling smiley

Ola
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: