node-tcrouter
  • Welcome
  • Getting Started
  • Javascript Docs
    • TCRouter
  • Guides
    • Status Information
    • Sending Text Messages
    • Receive Text Messages
    • Device Connection Status
    • Control IO
    • Sending Emails
    • Control VPN
  • Hardware
    • Overview
  • Setup
    • Setup Overview
    • Socket Server
    • Enable SMS
    • Enable Email
    • Setup VPN
Powered by GitBook
On this page

Was this helpful?

  1. Guides

Control VPN

Control ipsec and openvpn tunnels remotely

The node-tcrouter package can control the state of the TC Router's VPN connections. These include IPSec and OpenVPN networking technologies.

const tcr = require(" @phoenixcontactusa/node-tcrouter");

var TCRouter = new tcr("192.168.1.1", 1432, 3000);

//Send an email
//controlVPN(type,index,state)
//type: 1:ipsec,2:openvpn
//index: index of the desired VPN tunnel 
//state: boolean state to connect or disconnect the VPN
//Connect the first ipsec vpn tunnel which was configured
TCRouter.controlVPN(1,0,true)
  .then(res => {
    console.log(res);
  })
  .catch(e => {
    console.log(e);
  });

PreviousSending EmailsNextOverview

Last updated 5 years ago

Was this helpful?