Page 1 of 1

force to create/use specific tun number interface

Posted: Fri Mar 08, 2019 7:51 pm
by boistordu
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