Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Status_openvpn.php variable declare

    Scheduled Pinned Locked Moved webGUI
    2 Posts 1 Posters 842 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      k0ssi
      last edited by

      Hello,

      currently i try to monitor to monitor established openvpn connections.
      All information i want to monitor are avaible in the "status_openvpn.php" files (Status->Openvpn). I explored the PHP File and found the Variables i want to "export" (use in my own script)

      			$rowIndex = 0;
      			foreach ($server['conns'] as $conn): 
      				$rowIndex++;
      			?>
      			'>
      
      					![](/themes/<?php echo $g[)/images/icons/icon_x.gif' height='17' width='17' border='0'
      					   onclick="killClient('', '');" style='cursor:pointer;'
      					   name=''
      					   title='' alt='' />
      
      

      These are exactly those infomration i need.
      My main problem is to find the PHP Function oder PHP file which provides the "$conn" variable.

      The second thing i found while xploring the code is
      including the following to files which doesnt exist in "www" directory.

      require_once("service-utils.inc");
      require_once("openvpn.inc");
      

      so these part may be depracted ?

      PS: sorry for my bad english

      regards from Germany

      1 Reply Last reply Reply Quote 0
      • K
        k0ssi
        last edited by

        Lol found it seconds after creating this thread…. i searched the wrong variable ...

        the variable i needed was $server['conns'] not $conn.
        i forgot how foreach works ....

        //
        found the files under /etc/inc/....

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.