Tunnel works but status says service is stopped.

  • I have the following setup: a Atom box with 1 real nic with 2 VLAN's on it, the WAN and LAN. (I use a cheap managed switch to tag WAN and LAN ports)
    Then I have a PPPoE tunnel on the WAN interface named OPT1.
    I also have an openVPN tunnel to PIA on OPT1 (through the PPPoE connection)

    LAN  traffic is NAT routed to the OpenVPN tunnel. All of this is working correctly, the VPN tunnel connects through the PPPoE which goes through the VLAN. Only problem is that the status page claims the openVPN daemon is not running.

    Everytime I reboot the box, everything comes up correctly and I can get on the internet. But the status page claims the openVPN daemon is not running. When I try to start the service, only thing I get is a error in the openvpn log that openvpn is already running.

    Is this a known bug in 2.1 release?
    How do I kill the daemon from the shell so I can restart it through the GUI? (This is assuming the status page will see it running if it is started manually through the web interface)

  • I also occasionally have times when the system loses track of which OpenVPN process is running. The system itself is working OK, as you say.
    The system remembers which OpenVPN is which PID in /var/run/openvpn*.pid files. I suspect that the value in the PID file somehow gets different to the PID of the actual process. At that point, the GUI front-end restart does not work, because it can't find and kill the running OpenVPN process. You should be able to patch it back up by finding the running OpenVPN process and killing it, delete the pid file also. Then a restart from the GUI should work.

    [2.1-RELEASE]/var/run(18): ls -l /var/run/openvpn*
    -rw-r--r--  1 root  wheel  6 Dec 23 00:00 /var/run/openvpn_client1.pid
    -rw-r--r--  1 root  wheel  6 Dec 23 00:00 /var/run/openvpn_server10.pid
    -rw-r--r--  1 root  wheel  6 Dec 23 00:00 /var/run/openvpn_server12.pid
    [2.1-RELEASE]/var/run(19): ps aux | grep openvpn
    root       32107  0.0  1.7  5432  4132  ??  SNs  12:00AM   0:00.65 /usr/local/sbin/openvpn --config /var/etc/openvpn/server10.conf
    root       45912  0.0  1.6  5432  3740  ??  SNs  12:00AM   0:01.74 /usr/local/sbin/openvpn --config /var/etc/openvpn/server12.conf
    root       61516  0.0  1.6  5432  3792  ??  SNs  12:00AM   0:05.45 /usr/local/sbin/openvpn --config /var/etc/openvpn/client1.conf
    root       50784  0.0  1.0  4696  2488   0  RV   10:17AM   0:00.00 grep openvpn (tcsh)

  • Same thing happening in this thread: https://forum.pfsense.org/index.php?topic=77637.0