When connected to my VPN (in this case using the OpenVPN app Viscosity) it creates a utun interface that looks like this when queried using ifconfig utun10
:
utun10: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet 10.20.0.30 --> 10.20.0.30 netmask 0xffff0000
inet6 aaaa::bbbb:cccc:dddd:eeee%utun10 prefixlen 64 scopeid 0x17
inet6 ffff:aaaa:bbbb:cccc::dddd prefixlen 64
nd6 options=201<PERFORMNUD,DAD>
From the command line or (better yet) programmatically, is there any way I can figure out the hostname or IP address of the VPN server that's on the other end of utun10
?
utun10
since the other active interfaces will have the live connection to the server - the tunnel describes what gets tunneled - not to where the first hop isutun10
(and anyutun
interface in general) does not have any kind of metadata or method for figuring out where its traffic goes? I'm still new to virtual interfaces, so I wasn't sure if their data goes somewhere identifiable or if it's just a general purpose channel where the app that created it simply receives its input and then does whatever it wants with it. (In the case of Viscosity, that's probably sending it over a UDP connection to the VPN server.)