How to create a single ovpn file

This forum is for general conversation and user-user networking.
Post Reply
elrolo192
OpenVpn Newbie
Posts: 2
Joined: Mon May 17, 2021 2:51 am

How to create a single ovpn file

Post by elrolo192 » Mon May 17, 2021 3:21 am

Hello. I am new in openvpn and I am trying to create a single file .ovpn to send to my clients. I've succesfully created a mikrotik certificates ca and cert and key and put all together in a single ovpn file. My question is. Can I add the username and password in the same file so that my clients only need to import the ovpn file and no need to use a file with auth-user-pass extra-file or the openvpn don't ask for the username and password? Is there an option I can use like the <ca> for the certificate to add the username and password in the ovpn file?

User avatar
TinCanTech
Forum Team
Posts: 9195
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to create a single ovpn file

Post by TinCanTech » Mon May 17, 2021 6:29 pm

elrolo192 wrote:
Mon May 17, 2021 3:21 am
Is there an option I can use like the <ca> for the certificate to add the username and password in the ovpn file?
No, that would be a very bad idea.

zxun
OpenVpn Newbie
Posts: 16
Joined: Mon Jan 04, 2021 2:26 am

Re: How to create a single ovpn file

Post by zxun » Thu May 20, 2021 10:08 am

I think what you want is a simple point-to-point tunnel.
If you are sure that your openvpn server will only have one client, you can do so even without ca.

However I suggest you should set up basic password authentication, which could be stored in config of the client.

User avatar
TinCanTech
Forum Team
Posts: 9195
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to create a single ovpn file

Post by TinCanTech » Thu May 20, 2021 11:21 am

zxun wrote:
Thu May 20, 2021 10:08 am
I suggest you should set up basic password authentication, which could be stored in config of the client
The username and password cannot be stored in the config file :!:

zxun
OpenVpn Newbie
Posts: 16
Joined: Mon Jan 04, 2021 2:26 am

Re: How to create a single ovpn file

Post by zxun » Thu May 20, 2021 1:22 pm

TinCanTech wrote:
Thu May 20, 2021 11:21 am
The username and password cannot be stored in the config file :!:
Sorry, but I stored it in another file in the same directory with the config file

Code: Select all

auth-user-pass password.txt

User avatar
TinCanTech
Forum Team
Posts: 9195
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to create a single ovpn file

Post by TinCanTech » Thu May 20, 2021 1:36 pm

Yes, that is acceptable.

However, the point of a password is to ensure a human is typing it in not having it automated.

elrolo192
OpenVpn Newbie
Posts: 2
Joined: Mon May 17, 2021 2:51 am

Re: How to create a single ovpn file

Post by elrolo192 » Fri May 21, 2021 12:30 am

Thanks for the help, so I understand that there is no way to put the username and password inside the ovpn file. I understand the point of security, in this case unfortunately the people who want to use are "important" in my work and they don't want extra stepts to connect their computers. However I think I will make a manual to import the file and make everyone to use a username and password.

Post Reply