tun0: Rename OpenVPN Client Interface

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…)

OpenVPN: Connect Client Setup – Install & Config – Linux

In this article i am showing how to install OpenVPN client on RPM/DEB-based Linux distributions and configure it to connect to OpenVPN server.

Particularly i will show an example of OpenVPN client configuration file that i use to connect to OpenVPN server with certificates and username/password-based authentication, how to create a systemd service for OpenVPN client and how to configure it to start on the system’s boot. (more…)