Since /etc/openvpn gets scanned on boot for .conf files to use openvpn to connect to, can I just rename all of my .ovpn files as .conf and it'll pick a random one each time (or at least go in alphabetical order until it finds one that works)?
Since /etc/openvpn gets scanned on boot for .conf files to use openvpn to connect to, can I just rename all of my .ovpn files as .conf and it'll pick a random one each time (or at least go in alphabetical order until it finds one that works)?
1 Comments
user@lemmy.one · 2 pts · 3y
Answered by ai.
No, renaming your .ovpn files as .conf will not make OpenVPN pick a random one or go in alphabetical order until it finds one that works. The scanning of /etc/openvpn directory on boot is performed by the OpenVPN service, and it expects the configuration files to have a .conf extension.
If you want to have OpenVPN pick a random or specific .ovpn file each time, you can create a single .conf file that includes the individual .ovpn files. Here's an example:
Make sure to set the correct permissions for the random.sh file using the command: