Pid openvpn client

  • I have done 3 openvpn clients

    In Status / System / LogsOpenVPN there is a column PID, some of thats are the clients, but how can I match pid with openVpn client?


  • Galactic Empire

    Are you trying to figure out what process ID a specific client is using ?

    [2.4.4-RELEASE][admin@pfsense]/root: ps -ax | grep vpn
    16741 -  Ss        0:00.18 /usr/local/sbin/openvpn --config /var/etc/openvpn/client1.conf
    45674  -  Ss        0:00.17 /usr/local/sbin/openvpn --config /var/etc/openvpn/client3.conf
    60215  -  Ss        0:00.17 /usr/local/sbin/openvpn --config /var/etc/openvpn/client2.conf
    11358  0  S+        0:00.00 grep vpn
    [2.4.4-RELEASE][admin@pfsense]/root: grep remote /var/etc/openvpn/client1.conf
    remote 1194
    remote-cert-tls server

  • Yes, because I want understand what client have some warnings in Status / System / LogsOpenVPN.
    What about using webgui instead ssh?
    Otherwise what is the purpose of writing this data(PID) on webgui?


  • Galactic Empire

    Diagnostics -> Command Prompt -> Execute Shell Command

  • LAYER 8 Moderator

    If you gave your OpenVPN server and client configurations proper descriptions they will show up under Status/OpenVPN or Interfaces/Assignments. The later one will show you which ovpnsX or ovpncY interface is which instance so you know which configuration (ovpns5 -> server5, ovpnc2 -> client2) is used.

    If you want to match the PID, just grep it with command prompt "ps ax | grep <pid>" to show the OVPN process in question. Other than that, the PID is more for debugging logs and to grep/see, which log entries belong to the same instance. If you have multiple servers/clients connecting at the same time, you can sort with that what messages belong to what instance.

  • For the reasons you say JeGr, I think that the openvpn log in webgui is more readable with client description than with PID, or add the process ID in Interfaces/Assignments.
    Thank you all for the answers.

  • LAYER 8 Moderator

    @tronix said in Pid openvpn client:

    client description

    Those would be dependent on either using the ovpns/ovpnc interface - which wouldn't be any more specific than using the PID like now - or showing the description the user enters while configuring the client or server setup. So if nothing is entered as description, what should be shown? You see, it's not that hard showing something but hard to show the right thing ;)
    Also having to dig out the ovpn interface and description belonging to the specific PID (the log that is shown is the system log from OpenVPN itself) would require multiple calls to parse config.xml or ovpn config files to read the informations so would probably slow down log parsing/showing, too.

Log in to reply