SSH and tun devices: which one?



Is there some way to determine the id of a tun device allocated by ssh on
the server side when the -w option is used? I'd hoped for a nice easy
environment variable, but no such luck.

I do note that an "lsof -p $PPID | fgrep /dev/net/tun" identifies the
open file descriptor. But I've not yet found a way to map this to the
tun device.

I know that the device can be *specified* with the -w option, but I'm
hoping to avoid having to "preallocate" devices to users.

Any suggestions?

Thanks...Andrew
.



Relevant Pages

  • Re: OpenVPN server (win32) wrong Netmask
    ... The device is working as a tun device, not as tap as I wrote, sorry! ... In the meantime I changed the server statement in the server openvpn ... software on server1 and I entered routing information to the DSL ... I wonder how the routing software will know that 10.18.0.6 must be ...
    (comp.os.linux.networking)
  • Finding the new tun device
    ... how on the server can one identify the just- ... created tun device? ... this that one can run the necessary ifconfig, but I'm not spotting it. ... What am I missing? ...
    (comp.security.ssh)
  • Forwarding a login session?
    ... My original plan was to use vtun to tunnel out of the machine to me so I ... vtun need the tun device. ... I've thought about having ssh forward port 20 (or whatever telnet runs on) ...
    (comp.os.linux.networking)
  • How to destroy tun device (created by ssh -w)?
    ... I've tun devices created via "ssh -w". ... Sometimes, the connection is ... broken in a way that leaves the tun device around. ... But ifconfig does show it, ...
    (comp.os.linux.networking)