I have used OpenVPN since 6-7 years or more but only as a means for a
user to connect to a private network such as a business office or someone else's home network. In all these cases an action by the user has started the process, which includes entering a password.
Now I am building remote monitoring systems using Raspberry Pi devices and these need to connect as
clients to a "home base" OpenVPN server when they operate. But there is no user present to do this...
I could do it the same way as if a user is there via some cron or startup job, but this will not work because there is no user to enter the password on connection...
So how should the client.conf file be written to make this happen?
Is there some limitation on the server side for it to work?
I
have read
the 2X HOWTO Guide about automatically running on start. But what it states does not solve the user password entry problem. It looks more like how to set up OpenVPN
server to run on start...
I need the
client to connect on system start and it says that if there is a conf file in the /etc/openvpn dir on startup then it will autoconnect using that. I guess that what the HOWTO states is that each conf file triggers one instance of openvpn to run with that conf. This would make sense for servers, but for clients there is the password entry problem...
All of my ovpn files (used on Windows) or conf files (on Linux) cause a login dialog on connection and there is no user there to enter anything into that...
So how can I set up the client (or server?) conf files such that the connection can proceed automatically?
Is there a trick when creating the user.conf/user.ovpn files or is there some server side setting that needs to be used?