IPSec Status on Dashboard in 1.2.2 (And 1.2.3?) - Workaround/Patch


  • Rebel Alliance Developer Netgate

    Someone mentioned on IRC that the Dashboard always shows IPSec tunnels as down on 1.2.2, and I suspect the same is true on 1.2.3 as well but neither of us had a 1.2.3 box running to check.

    Anyhow, the culprit is that setkey changed paths between versions, it used to be /sbin/setkey and now it is /usr/local/sbin/setkey

    If you change the path to setkey on line 3 of /usr/local/www/widgets/include/ipsec.inc, the Dashboard returns the proper status.

    
    *** /usr/local/www/widgets/include/ipsec.inc.orig       Sun Feb  8 21:03:14 2009
    --- /usr/local/www/widgets/include/ipsec.inc    Sun Feb  8 21:03:25 2009
    ***************
    *** 4,10 ****
    
      function get_ipsec_tunnel_sad() {
            /* query SAD */
    !       $fd = @popen("/sbin/setkey -D", "r");
            $sad = array();
            if ($fd) {
                    while (!feof($fd)) {
    --- 4,10 ----
    
      function get_ipsec_tunnel_sad() {
            /* query SAD */
    !       $fd = @popen("/usr/local/sbin/setkey -D", "r");
            $sad = array();
            if ($fd) {
                    while (!feof($fd)) {
    

Locked