force to create/use specific tun number interface

How to customize and extend your OpenVPN installation.
Post Reply
boistordu
OpenVpn Newbie
Posts: 3
Joined: Thu May 24, 2018 7:38 pm

force to create/use specific tun number interface

Post by boistordu » Fri Mar 08, 2019 7:51 pm

Hi,

Maybe this question have already been asked but I wanted to know if there is a way to force openvpn-client to use and create a specific interface when using a specific conf file?
I'm asking because I've noticed that under archlinux and raspbian there are inconsistencies where from time to time at boot when launching automatically the openvpn-client connection it creates tun1 in place of tun0 and sometimes even when restarting the service like I want to do every xx hours it creates a new tun interface....
So should I add something in the configuration file or should I only modify the systemd unit file by modifying this line :

Code: Select all

DeviceAllow=/dev/net/tun rw
into this

Code: Select all

 DeviceAllow=/dev/net/tun0 rw
Thanks in advance

Post Reply