host .ovpn username and password on web hosting
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 3
- Joined: Tue Sep 13, 2022 2:34 pm
host .ovpn username and password on web hosting
Hello. is that anything command in config file that can connect username and password from hosting?
i host pass.txt in my site meaning it will like this mysite.com/pass.txt
i try use
auth-user-pass "mysite.com/pass.txt"
but i got an error:
2022-09-13 21:36:02 WARNING: cannot stat file "mysite.com/pass.txt": Unknown error (errno=123)
Options error: --auth-user-pass fails with "mysite.com/pass.txt": Unknown error (errno=123)
Options error: Please correct these errors.
anyone can help me?
i host pass.txt in my site meaning it will like this mysite.com/pass.txt
i try use
auth-user-pass "mysite.com/pass.txt"
but i got an error:
2022-09-13 21:36:02 WARNING: cannot stat file "mysite.com/pass.txt": Unknown error (errno=123)
Options error: --auth-user-pass fails with "mysite.com/pass.txt": Unknown error (errno=123)
Options error: Please correct these errors.
anyone can help me?
-
- OpenVPN Protagonist
- Posts: 11138
- Joined: Fri Jun 03, 2016 1:17 pm
Re: host .ovpn username and password on web hosting
Openvpn does not interpret such things as URLs or environment variables in the config file.
Also, why would you put your password on a website ..
Also, why would you put your password on a website ..
-
- OpenVpn Newbie
- Posts: 3
- Joined: Tue Sep 13, 2022 2:34 pm
Re: host .ovpn username and password on web hosting
i see that. is that anyway to put direct username and password in .ovpn without using extension file?TinCanTech wrote: ↑Tue Sep 13, 2022 3:27 pmOpenvpn does not interpret such things as URLs or environment variables in the config file.
Also, why would you put your password on a website ..
-
- OpenVPN Protagonist
- Posts: 11138
- Joined: Fri Jun 03, 2016 1:17 pm
Re: host .ovpn username and password on web hosting
I don't understand you very well. Try searching the manual for 'pass' and 'word'.
-
- OpenVpn Newbie
- Posts: 3
- Joined: Tue Sep 13, 2022 2:34 pm
Re: host .ovpn username and password on web hosting
sorry. as you said "Openvpn does not interpret such things as URLs or environment variables in the config file.". So i don't want use .txt file to put username and password there. so i looking the other way that can enter username and password in .ovpn config fileTinCanTech wrote: ↑Tue Sep 13, 2022 3:37 pmI don't understand you very well. Try searching the manual for 'pass' and 'word'.
example the one i don't want is:
auth-user-pass auth.txt
alternative i looking is like this or similar with it
auth-user-pass username:password
meaning no need link with other file.
i doing this because i build an android app. so its difficult to use local file that written with username and password. so i looking for alternative way that android app easier to access config with username and password.
-
- OpenVPN Protagonist
- Posts: 11138
- Joined: Fri Jun 03, 2016 1:17 pm
Re: host .ovpn username and password on web hosting
It really makes no difference what file you use to record the username and password.
However, Openvpn only allows a standard text file for this purpose, currently.
However, Openvpn only allows a standard text file for this purpose, currently.
- dazo
- OpenVPN Inc.
- Posts: 155
- Joined: Mon Jan 11, 2010 10:14 am
- Location: dazo :: #openvpn-devel @ libera.chat
Re: host .ovpn username and password on web hosting
The "auth.text" part is expected to be a file which the openvpn program on your machine can read. If it is in the same directory as your OpenVPN configuration file, then the file can be in the same directory. Just ensure the read privileges to this file is restricted, so other users can't read it.
Update: I was just informed this below only works with OpenVPN 3 based implementations, not OpenVPN 2.x versions.
Alternatively you can instead of using the "auth-user-pass auth.txt" in your configuration file, you can replace it with this:
Update: I was just informed this below only works with OpenVPN 3 based implementations, not OpenVPN 2.x versions.
Alternatively you can instead of using the "auth-user-pass auth.txt" in your configuration file, you can replace it with this:
Code: Select all
<auth-user-pass>
username_goes_here
password_goes_here
</auth-user-pass>
- openvpn_inc
- OpenVPN Inc.
- Posts: 1332
- Joined: Tue Feb 16, 2021 10:41 am
Re: host .ovpn username and password on web hosting
Hi vqoley,
Android users can install a text editor, or create the file somewhere else, and use some means to copy it or download it to the phone or tablet.
regards, rob0
Android users can install a text editor, or create the file somewhere else, and use some means to copy it or download it to the phone or tablet.
regards, rob0
OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support
- ordex
- OpenVPN Inc.
- Posts: 444
- Joined: Wed Dec 28, 2016 2:32 am
- Location: IRC #openvpn-devel @ libera.chat
Re: host .ovpn username and password on web hosting
A patch to address this issue has been submitted to the mailing list. With this patch it is possible to store user and pwd inline in the .ovpn file, as suggested by dazo.
https://patchwork.openvpn.net/project/o ... stable.cc/
https://patchwork.openvpn.net/project/o ... stable.cc/