|
|
I am seeking a scripted means of detecting the tun interface which is
associated with a particular openvpn instance. I can easily identify
the PID's of all openvpn ... pidof(8) (killall5). But I have not yet
found a simple way to identify which tun (or perhaps even tap, although
I only use --dev tun) that PID is using.
I've been looking at lsof(1) and netstat(8), as well as poking around
the /proc tree. This is Linux, but I would prefer something portable,
if that's possible. Linux /proc/$PID/fd/{3,4} ?
I know I can get the IP addresses from the interfaces and the config
filename from /proc/$PID/cmdline, then look up the IP from the file,
but that's ugly. Am I missing something simple? Thanks.
--
mail to this address is discarded unless "/dev/rob0"
or "not-spam" is in Subject: header
____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users
|