4

Ok, let me first start off by saying that I've only ever dealt with VPN access through windows by setting up a connection through the control panel. It's pretty simple since everything is pretty much a point-and-click setup.

I'm now working on a project where I need to access a computer cloud on a private network (there is no public IP directly to the cloud so it can only be accessed when I'm on the network). My project involves a website that needs to access that cloud "somehow". Because of my lack of experience/knowledge with VPN's through the command line and how to programmatically connect to a VPN, I've hit a mild obstacle that I'm hoping someone here can help me with.

What kind of server side scripting would I do to get a VPN connection up and running? The website is being hosted on a linux machine. Is their a "default" VPN utility under linux that I can call through PHP to establish a connection? If not, I would really appreciate any and all suggestions on how to circumvent this little problem of mine. FYI the VPN uses PPTP.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
Josh Bradley
  • 4,630
  • 13
  • 54
  • 79

1 Answers1

3

Looks like there is a little bit to getting it set up from a shell rather than the GUI, but here are some references that will hopefully help you out.

If you set up the connection and connect it, when your PHP script attempts to communicate with an IP address on the remote side of the connection, it will go through the PPTP connection. Having the connection always open is probably better than having to your PHP script connect every time it needs to do something.

http://ubuntuforums.org/showthread.php?t=1443735 - An easy PPTP client setup http://pptpclient.sourceforge.net/ - Client you can install and configure http://www.cyberciti.biz/tips/howto-configure-ubuntu-fedora-linux-pptp-client.html - Walk through of setting up PPTP using the linux PPTP network manager

Hopefully those will help you out a bit. The first one looks like it may be worth trying first.

drew010
  • 68,777
  • 11
  • 134
  • 162
  • Thank for the comments. I'll have a look at each one. Unfortunately the website is being hosted by GoDaddy and from what I've heard, trying to tell them what to install is a major task. Are you aware of any PPTP clients that GoDaddy automatically installs on their servers? – Josh Bradley Nov 05 '11 at 00:14
  • Oh I see, no then, no chance of anything like that on Godaddy hosting. You'd have to get a VPS or dedicated to be able to do that. – drew010 Nov 05 '11 at 01:11