Choosing adapter name for tap/tun devices?

Got a problem with Viscosity or need help? Ask here!

proste10

Posts: 1
Joined: Mon Jun 28, 2021 5:54 am

Post by proste10 » Mon Jun 28, 2021 5:57 am
Hi
Is it possible to control the name of the tap/tun devices created upon connecting to VPNs?

Thanks

James

User avatar
Posts: 2312
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Mon Jun 28, 2021 8:10 am
Hi proste10,

I'm afraid it's not possible to select a custom name for a network interface, however you can specify the number for the interface to use. For example, if you have a "tun" style connection, and you always want it to use "utun50" as the network interface name, you can add the command "dev tun50". For more information please see:
https://www.sparklabs.com/support/kb/ar ... n-commands

However we recommend against using fixed network interfaces indexes, as it can result in clashes or unexpected behaviour in some instances. If you need to know the network interface in a script, see here how a script can access the interface name dynamically:
https://www.sparklabs.com/support/kb/ar ... on-details

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs
2 posts Page 1 of 1