NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Hi, Is there any hope to have one day a VPN CLIENT feature inside your routers? I know this is someting more about custome firmware, but I heard Asus allow it on its regulkar firmware too... ...
W9smith
Aug 24, 2018Aspirant
I hope this will help others with similary issues.
setup:
Many PCs at satallite offices. Windows 10 build 1803. Some 32bit, some 64bit. Some AMD CPU, some INTEL CPU. All with HDD. All with 4GB RAM. Most 5+ years old.
Router (Netgear Nighthawk R7000) at main office.
issue:
Tried the xxx-UP.bat for use with OpenVPN to map drives. Was inconsistent in results.
Tried using SCHEDULE TASK to start OpenVPN. Was inconsistent in results.
Solved:
Created simple CMD file, put it in STARTUP. Solved all Open VPN and drive mapping issues.
Had to use START in CMD file to prevent lockup. This required TIMEOUT to set the delays until commands finished.
Contents of CMD file:
echo off
echo. Starting VPN connection . . .
:: REM ==== CLEAN ENVIRONMENT PART ====================
:: REM remove drive maps
If exist K:\nul net use K: /delete > nul
If exist L:\nul net use L: /delete > nul
:: REM Any previous OpenVPN - disconnect and exit
start /b "" "C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect client.ovpn
TIMEOUT.EXE /T 3 /NOBREAK > nul
start /b "" "C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command exit
TIMEOUT.EXE /T 2 /NOBREAK > nul
:: REM ==== OPENVPN CONNECTION PART ====================
start /b "" "C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command connect client.ovpn
TIMEOUT.EXE /T 6 /NOBREAK > nul
:: REM ==== DRIVE MAP PART =========================
:: REM wait until server access is available
echo.
echo. Checking for VPN connection . . .
echo.
:LOOP1
netsh interface show interface | find "NETGEAR-VPN" | find /I "disconnected" > nul
:::: find disconnected returns 0. Not finding disconnected returns 1
if %errorlevel% == 1 goto END
echo. VPN not connected. Checking in 5 seconds . . .
timeout.exe /t 5 /nobreak > nul
goto LOOP1
:END
:: REM Map drives
echo.
echo. VPN connection is OK.
echo.
echo. Connecting K: drive now . . .
timeout /t 3 /nobreak > nul
net use K: \\192.168.1.2\<share> <password> /user:administrator /PERSISTENT:NO
echo.
echo. Connecting L: drive now . . .
timeout.exe /t 3 /nobreak > nul
net use L: \\192.168.1.2\<share> <password> /user:administrator /PERSISTENT:NO
:: REM allow user time to read screen messages
timeout.exe /t 4 /nobreak > nul
cls
exit
I place this CMD file code in public domain. Anyone can use it without restrictions.
May it help solve issues you may have.
WS