Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

script vpn freeopenvpn login password

451 views
Skip to first unread message

Scott Lurndal

unread,
Sep 4, 2021, 11:35:05 PM9/4/21
to
[1]If you go to https://www.freeopenvpn.org/index.php
[2]You can download a free openvpn configuration file
[3]Which asks for a login/password (which they give you)

Doing this as admin puts you on free vpn all day with no limits (AFAIK).
C:\Program Files\OpenVPN\bin\openvpn.exe USA_freeopenvpn_udp.ovpn

When you run that command, it only asks for the login/password.

How can we put the login/password into the text config batch file
so that this command works but without asking for the login/password?

Here is a current US openvpn config file (they may change over time).
https://www.freeopenvpn.org/premium.php?cntid=USA&lang=en

This is the UDP version of that text free vpn config file.
https://www.freeopenvpn.org/ovpn/USA_freeopenvpn_udp.ovpn

The username is always the same it seems: Username: freeopenvpn
The password changes daily but is currently: 009054723

What's the batch file syntax to feed it the login & password?

Scott Lurndal

unread,
Sep 11, 2021, 6:38:17 AM9/11/21
to
> What's the batch file syntax to feed it the login & password?

The answer is covered in this thread just now:
https://groups.google.com/g/alt.msdos.batch/c/g6Md_OW05AE

1. Create a login/password file of any name such as "freeopenvpn.txt"

2. Put into that file one line for the login & another for the password
freeopenvpn
536494485

3. Add a pointer in the ovpn file to that login/password text file.
In the freeopenvpn.ovpn file, change this one line from:
auth-user-pass

Change that to point to the login/password text file you created.
# auth-user-pass
auth-user-pass freeopenvpn.txt

Better yet, to also work in the Windows File Explorer, add the full path
# auth-user-pass
# auth-user-pass freeopenvpn.txt
auth-user-pass C:\\full-path-to\\configs\\freeopenvpn.txt

If the full path isn't specified, then a "cd" is needed in the batch file:
freeopenvpn.bat
cd C:\full-path-to\configs
C:\path-to\openvpn\bin\openvpn.exe C:\full-path-to\configs\freeopenvpn.bat
pause

The pause allows you to see errors (otherwise the command window goes away).
The cd allows it to work by rightclicking in the Windows File Explorer
(where you also have to select "Run as administrator" for the openvpn.exe
route commands to work).

Otherwise you can run the batch command in an administrator command window.
(Check the results with "curl icanhazip.com" which reports your IP address).

Scott Lurndal

unread,
Sep 29, 2021, 3:49:00 AM9/29/21
to
Scott Lurndal writes:
> Better yet, to also work in the Windows File Explorer, add the full path
> # auth-user-pass
> # auth-user-pass freeopenvpn.txt
> auth-user-pass C:\\full-path-to\\configs\\freeopenvpn.txt

Since everyone can make use of a free VPN now and then, especially to choose
the country of your current IP address, here's the automated batch file that
I've ended up with (for now anyway). If you can improve it for everyone,
please do as anyone should be able to run this to get a free VPN working.

I've automated as much as I can the two steps needed each time it's run.
A. Obtain the daily password.
B. Put that daily password into the text login/password file.
C. Then connect to the free VPN (many config files are available).

If you can improve this, that would help everyone even more than I did.

1. Create freeopenvpn.txt containing just these two lines below.
(the first line is the login (which doesn't change often).
(the second line is the password (which changes daily).

===< below are the contents of freeopenvpn.txt >===
freeopenvpn
350048579
===< above are the contents of freeopenvpn.txt >===

2. Download the static freeopenvpn UDP or TCP configuration file.
(USA_freeopenvpn_udp.ovpn, USA_freeopenvpn_tcp.ovpn)
<https://www.freeopenvpn.org/premium.php?cntid=USA&lang=en>

You only need to change one line in this static config file.
Change this: auth-user-pass
Change it to: auth-user-pass C:\\full-path-to\\configs\\freeopenvpn.txt

3. Run this batch file each time you wish to connect to a free VPN.
a. It will tell you the URL to get the latest daily password.
b. It will open up the text file so you can change that password.
c. Then it will connect to that free openvpn server for you.

===< below are the contents of alt.msdos.bat freeopenvpn.bat >===
@echo off
REM freeopenvpn.bat (as found on alt.msdos.bat)
set editor=C:\windows\notepad.exe
echo %editor% "c:\tmp\vpn\config\free\freeopenvpn.txt" &
pause
set browser=C:\path-to\chrome.exe
echo %browser% "https://www.freeopenvpn.org/premium.php?cntid=USA&lang=en" &
pause
set configdir= C:\full-path-to\configs\
cd %configdir%
set configcmd=C:\path-to\openvpn\bin\openvpn.exe
REM (you can choose which, of many, free openvpn files to download)
set configfile=USA_freeopenvpn_udp.ovpn
%configcmd% %configdir%%configfile%
REM pause
===< above are the contents of alt.msdos.bat freeopenvpn.bat >===

That's the most I can, so far, automate this script (with my skills).
Any improvements will help anyone who finds this thread in a search.
0 new messages