Jump to content

Displaying values from a device on an authenticated VPN?


mayeska

Recommended Posts

Hi.

 

Let me start by apologizing for my total lack of expertise in this area -- I'm not a programmer, I'm a webmaster with limited php experience.  I'm coming here because I'm sincerely hoping someone will take pity on me and help me out.  ???  My problem is this...  My company builds industrial equipment.  This equipment can relay information to remote users through a web modem.  The modem outputs data in the form of a small table, which it updates in real time.  At any moment in time, I can access the system's data via the modem, using a secure VPN connection.  The data, when accessed, looks something like this...

 

"TagId";"TagName";"Value";"AlStatus";"AlType"

2;"LEL_Alarm";0.000000;4;0

3;"HHL_Alarm";0.000000;4;0

4;"Vacuum";674.000000;0;0

5;"Flow";14.000000;0;0

 

As you can see, the table gives each "tag" an ID number, a name, a value, an alarm status, and an alarm type.  This particular system has four tags -- four parts of the equipment which spit out data.

 

Here's where things get interesting.  Due to VPN restrictions, only one computer at a time can access this data -- and this doesn't work for us.  There might be five people across the country who all want to see the data at the same time.  So, here's what I'd like to do.  I'd like to connect our webhost computer to the VPN (which I've done successfully) and then have the webhost pull the data through the secure VPN and post it on the nonsecure internet.  I figure, if the webhost can pull this data, it should be able to display it to anyone. 

 

The trick is that the person viewing the webpage will NOT be an authenticated member of the VPN.  The webhost is the ONLY machine which will be allowed to reach through the VPN tunnel and grab the tag data.  I can't just hyperlink to the data -- if I do that, non-VPN members will get an error because they aren't qualified to view the resource.  I need the webhost to reach through the VPN tunnel, lock onto the modem's IP address, log into the modem, grab the tags and then throw them out for those viewing from cyberspace. 

 

Is there a way to code this?? 

 

A specific example of this hypothetical code would be GREATLY appreciated.  At this point, I'm willing to bribe potential helpers with chocolate if it will help my cause.

 

Thanks ahead of time,

Karen 

 

Link to comment
Share on other sites

It sounds rather easy to achieve this.  PHP has everything you need to get this working.  If the interface is using HTTP, as it would be if it's web-based, you can use the cURL library to log in to the specific IP address.  I'd suggest making a script that is run in a scheduler (like CRON on a *nix box), which periodically checks the machines in order.  It can save that information into a database, and then you can make a basic website in PHP that accesses that information.  The benefit of this method is you will have an accurate history of what each box spat out stored in the database, should you want to graph it or use it in reports, or even generate automated email/sms alerts should something go awry with one of them.  You could make a table in the database that lists each machine's IP address (and a friendly name if you want, to make viewing the data more human-friendly), which could also be updatable via a web interface, so should you want to add a new machine to the system, you just enter in its IP address (and name it), click "ok", and it'll be automatically included in the next poll.

 

Does that sound like something you could do?  It's easier than it sounds :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.