OpenVPN Autologin

I wanted OpenVPN to autologin on one of my servers.  The issue here is two fold: UAC grabs the executable and demands confirmation, and the gui doesn’t retain credentials.  The solution to the latter does unfortunately require storing those credentials plaintext in a file, but if you’re not worried about that then read on. Continue reading

Windows – Force Applications to Use VPN

Got an app you want to work only when connected to VPN?  Have Windows Firewall do the work for you

First, connect to your VPN.  Then, ensure that your Public connection is that VPN connection.  You can do this by opening Network and Sharing Center.  In the example below, clicking on Ethernet 3 on the Unidentified network reveals the VPN IP address.

apng Continue reading

ZyXEL C1000Z Scheduled Reboot – Windows

So there’s nowhere in its OS to schedule a reboot of ZyXEL’s C1000Z router.  Thankfully you can use Telnet to do it.

First, enable Telnet.  Log into the router, then choose Advanced Setup > Remote Console.  Under Console State choose LAN Telnet Enabled.  Set your Telnet username and password and click Apply.

Now you’re ready to go.  Create a .vbs file and populate it with the below, changing the IP address, username and password to be applicable to your router.

Option explicit
Dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "telnet"
WScript.Sleep 3000
oShell.Sendkeys "open"
WScript.Sleep 3000
oShell.Sendkeys "admin~"
WScript.Sleep 3000
oShell.Sendkeys "password~"
WScript.Sleep 3000
oShell.Sendkeys "reboot~"
WScript.Sleep 3000
oShell.Sendkeys "~"
WScript.Sleep 3000
oShell.Sendkeys "quit~"

Save this file.  You can double click it to test it.  After having confirmed it works, create a task pointed to it in Windows Task Scheduler.  Modern Windows OSes should natively run a vb script in scheduler.  If not, use CScript to launch the script:

C:\Windows\System32\CScript.exe //Nologo //B X:\PathToYourScript\YourScript.vbs

Switching DNS – Windows

I use the mighty Pi-Hole to streamline my browsing experience.  Sometimes, though, the ole Hole can get in my way, blocking something I need to see.  If it’s a one time deal, and not something I want to whitelist (which Pi-Hole has thankfully made easy to do via the web interface as of the latest edition), I wanted an easy way to temporarily switch DNS servers.

Enter QuickSetDNS, a groovy little exe that can do just that. Download QuickSetDNS and unpack it into the destination of your choosing.  There’s no installer – it’s a simple standalone exe.  Fire it up, right click in the whitespace and create a new DNS server entry. I’ve got one for my Hole, and one that points to Google’s public DNS servers.

After creating your entries, right click on one and choose Copy SetDNS Command Line. Then right click on your desktop and create a new shortcut.  Paste the SetDNS command line in for the location of the shortcut and click Next.  Name it something informative, and save it.  Do the same with your other DNS entries in QuickSetDNS.

There.  Now you have shortcuts you can double click to change your local DNS settings.

Windows 10 – disable automatic updates

One of the more annoying things about Windows 10 (and there are many) is the inflexibility with updates.  Luckily, you can edit policy to your advantage here.

  • Open the policy editor by clicking the windows button and then typing in gpedit.msc (enter)
  • Navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Updates
  • Double click Configure Automatic Updates to edit it.
  • Set it to Enable and choose 2 – Notify for download and notify for install

There you have it.  You haven’t prevented updates altogether, but at least you have some control over if/when they download and install.



Windows – Migrating Printers

At my POE we use virtual printers for all manner of file production.  It’s annoying.  What’s more annoying is when it’s time to upgrade a server using virtual printers.  Thankfully there’s a way to sorta kinda help the process, by sorta kinda easing the migration process.  The following screenshots are from Windows 2012 R2.  If you’re using a different Windows OS level your mileage may vary.  It’s my understanding that the titles of some of this differs by OS.

Continue reading