OpenVPN for windows is one of my favorite vpn. Here how to AutoConnect and make an autologin.
How to make the auto logon
1) Create a text file and inside store user and password:
Example
myuser
mypassword
2) Save it for example as login.conf in the config folder.
In my case the folder is C:\Program Files\OpenVPN\config
3) Edit the config file of your vpn.
In my case the file is stored in C:\Program Files\OpenVPN\config and the name is myremotehost-1201-myuser-config.ovpn
Usually the name reports the remote host name.
4) Add the following line
auth-user-pass login.conf
5) Save and Exit
NOTE: DO IT ONLY IF YOUR PC IS SECURE AND NOT SHARED
How to make AutoConnect to favorite VPN
You need to open the properties of windows shortcut and add after the quotes --connect configfile.ovpn
In my case I have
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --connect myremotehost-1201-myuser-config.ovpn
Bonus How to
- DNS ISSUE WINDOWS 10
The Windows 10 DNS resolver could create a problem to OpenVPN.
The is a DLL on GitHub that fix it
"Windows 10 DNS resolver sends DNS requests in parallel to all available network interfaces and uses the fastest reply to come. If you use DNS from the local network, this problem allows your ISP or a hacker with Wi-Fi ap to hijack your DNS records and steal your data even if you use VPN ."
See the link on "references" section
- CONNECTED BUT CANNOT CONNECT TO ANY LOCAL SERVICE
Also ping fails?
Try to restart Open VPN as Administrator.
- CANNOT CONNECT
If your pc has more than one connection port, for example wifi and lan and you are using lan, try to close the wifi and viceversa
REFERENCES
- have fun -