When an OpenVPN client establishes a connection with a server, by default, it uses a /dev/net/tun virtual network device and spawns a tunX interface.
If you have only one OpenVPN client, most of all the name of the interface is tun0 as, by default, there is a dev tun setting in the OpenVPN client’s .ovpn configuration file.
If you have multiple OpenVPN clients on the same machine the later started ones will spawn tunX interfaces from zero, i.e., tun1, tun2, etc.
In case of the multiple OpenVPN clients you may want them to spawn the interfaces with their own predefined names instead of using dynamically assigned ones.
This is useful if, for example, you want to set up different iptables firewall rules for them.
This note shows how to change the name of the OpenVPN client’s interface. (more…)