Technology

CIMG0012

Yubico and Authlite, Finally 2 factor login for windows!

First of if you don’t know what 2 factor authentication is, in the most common usage practice is a password (1st factor) and something else, usually an object or piece of paper with random passwords (2nd factor) to be entered in allowing passage through whatever login your dealing with, often using a One Time Pad (OTP) which is a password that you’ll only ever use once and should never repeat itself.

If your paranoid you’ve already heard of and gotten yourself a yubikey from yubico.com if not hold on a sec and check out what I’m about to drop on ya. (here’s a quick pic of my daily usb devices)

Up until now I’ve loved my yubikey, hell I have to use it to post on this site, but have always wanted a OTP enabled windows login. Authlite has teamed up with Yubico and fixed this!

Not only has Authlite fixed this problem they offer yubikey enabled almost everything on the windows platform! (Come on linux version!) From remote access, Active directory, and the all important Windows Login!

I’m very excited! I’ve already ordered my bundle and anxiously await it!

Nginx Startup and Shutdown bat files with prompts and auto start at boot!

So if you’ve read my previous post‘s I’m running the latest stable nginx server here on my local laptop to serve up my own search page

or for when I’m blocking ad’s to have a page that fills in the void’s (and shows me just how well it does work!)

But I left out a major point… You will need to open a command prompt and enter the C:\nginx directory and start nginx each and every time you bootup. That’s no fun even for a geek like me that spends half of his time on windows in an ssh terminal running back to one of my many linux pc’s but that’s still something we need to fix and like now!

So I did some digging around on google, and all of the post’s I’m reading say to use the .bat file located in the install, but the latest stable release of nginx DOESN’T INCLUDE THESE or ANY .bat FILES! Needless to say, that meant more work, and a quick intro into the quick grace at simple programming to have things done for you! So, Let’s build the start-nginx.bat file! (Note I’m running Windows 7 Ultimate Signature Edition, so this should work for you as well but let me know in the comment’s if it doesn’t!)

[codesyntax lang="winbatch" lines="normal" title="start-nginx.bat" blockstate="expanded"]

@ECHO OFF
start nginx.exe
echo Starting nginx
EXIT

[/codesyntax]

We don’t need anything neat or pretty on the start up as we just want it to run with minimal interference to our start up routine (remember this will be automated later) Also note, that this .bat file needs to be in the C:\nginx folder along with nginx.exe for it to work properly!

Here’s the pimpish part, the shutdown .bat file. (I mostly just modified the file I found here) but it works great!

[codesyntax lang="winbatch" lines="normal" title="stop-nginx.bat" blockstate="expanded" highlight_lines="11"]

@echo off

echo Stopping Nginx…

:SETYESNO

set /p yesno= Would you like to kill nginx? [y/n]:

if “%yesno%”==”" (echo You didnt enter anything – try again..) & (GOTO SETYESNO)

if /I “%yesno%”==”n” (GOTO NOKILL)

if /I “%yesno%”==”y” (GOTO KILL) else (echo Unrecognized command – try again) & (GOTO SETYESNO)

:KILL

echo.

echo Killing Process…

nginx -s stop

GOTO QUIT

:NOKILL

echo.

echo Aborting kill…

:QUIT

echo.

pause

[/codesyntax]

There’s also an interesting idea on turning nginx into a window’s service if your into a bit more of a hacking mood then I was at 2:30 am writing this.

Also you can change the commands I’ve highlighted on line 11 with any one of the commands from the nginx site such as let nginx shutdown gracefully, reload itself etc. just remember that each line will execute in a command prompt as if you typed it so let your minds wander on this one! .bat files are your friend! (also as a side note if you don’t want to have to click any button to continue replace pause on line 18 with exit)

Now let’s get nginx running on our bootup. Right click the start-nginx.bat file and select “Create Shortcut”. Name it whatever you like and then right click the shortcut you just made and cut (or copy) the shortcut and let’s add it to our startup folder in the all programs list.

Click your start menu, choose all programs, scroll down to the startup folder, right click it and choose “Explore” or “Open” and paste your shortcut into this folder. (allow any prompt’s that windows throws at you for needing admin right’s) and you should be good to go!

If this worked for you or you have any questions that google can’t answer or just want to say thanks please feel free to post a comment!  That’s why I do this!!! You’ll notice the lack of ad’s or shameless begging for donations, all I want is your thanks!

Pimping out your Linksys WRT54G

So you have yourself a normal off the shelf wrt54g wireless router and you’d like to get more out of it, well here’s some work I’ve done to mine and it’s not too hard and the benefit’s are WELL worth the effort!

What I’ve done is installed the awesome DD-WRT firmware, installed a heat-sink, adjustable cooling fan, potentiometer, and switch to adjust or stop the fan when the noise is not wanted. (really it was more for fun as the heat-sink alone does most of the work allowing you to overclock your router’s processor)

Also it’s been very stable since the upgrades and I am really quite happy with it! And for less then $30.00 worth of parts and some time and effort it’s a bad ass VERY capable router!

Here’s some pic’s of the work involved.

Your soldering point's for your main 12 volt power supply

Added Heat-Sink

Basic connections for the fan, light, potentiometer and switch

Router Guts!

Just prior to final assembly

Running and working a treat!

Top View of router running!

All of the part’s were available at my local Radio Shack including the heat sink (however I did need to trim it down using a dremel) thermal paste, wire, switches, light’s, potentiometer and fan for around $30 bucks. So for under a bill you too can have a pimping router that should run nice and stable, and fast for several years.  Worthy? Absolutely! Nerdy, probably more then your router! If you’ve done any good mods to your router please feel free to post them in the comments and don’t forget to give me a thumbs up!

Truecrypt Stepping Up Encryption and Plausible deny-ability.

Now if your paranoid I’m sure you’ve already discovered the great and mighty Truecrypt to encrypt your whole drive, but there’s a lesser reported feature they’ve included that will give you another reason for “plausible deny-ability” in so much as you don’t wan’t to be hastled by air traffic control asking your password’s, or even tip them off that you have your full drive encrypted in the first place, How about when you boot your pc for them, the dredded “Missing operating system” message pop’s up instead of the truecrypt boot manager?! Here’s how you do that.

Of course I’m assuming you already have Truecrypt installed and your drive encrypted. If you don’t there’s a ton of posts out there that will help you along the way.

Boot into your OS of choice and open Truecrypt. Open the Settings Option from the menu.

From the Setting’s menu, choose “Preferences” which will open another window full of options.

From that window, Choose the button at the bottom that say’s “More Options”

From the menu that pop’s up, choose “Encryption Settings…”

This will bring up yet another window, that will have the setting’s we’ve been looking for. Put a checkmark in the first box “Do not show any text in the preboot…..” and then choose what you’ld like it to say instead, such as “Missing operating system” but DO read the notes below as they tell you stuff like no text will be displayed when you enter your password or an incorrrect password. Good to know before you think you really did corrupt your MBR!

That’s it! Now when you power on your PC you’ll be greeted with the scarry word’s “Missing operating system” however you’ll still be able to login and your OS should start without any issues! So again, I say Thanks Truecrypt!

(on a side note you might wan’t to bring along an old copy of your XP install disk just in case someone at the airport or what have you, does ask why your bringing a broken laptop with you.)

Getting the Linksys WPSM54G Working on Linux and Windows 7!

First off this post is more for my own remembrance then informational and is aimed at the more advanced user then just putting in the disk and following the directions  (which will work just fine if you are running Windows Vista but not 7) however I was having issues getting this to work on linux as well as logging in to the web interface where this will mostly be taking place.

First before you can get to it wirelessly you will need to set up the Print Server. Attach it to your Router directly (wired). (I recommend anything running DD-WRT as I’ll be using this in my descriptions to follow. More on this in a bit.) After it’s attached Power it on.

Once the light’s turn green, head on over to your browser and login to your routers interface and head on over to the “Status” Tab.

Find and click on the “LAN” Sub-Tab and look for your Linksys Print Server and make note of it’s IP. (Mine is named LKEED64C don’t ask me why and for this walkthroughs sake we’ll assume it’s on IP 192.168.0.555)

Now that you’ve found the IP go ahead and open another tab in your browser (ctrl+t) and browse to the web interface at [codesyntax lang="text"]

http://192.168.0.555

[/codesyntax]

This will bring up the first page asking for your password. The default username is blank and the password is “admin” Please for god’s sake, CHANGE THE DEFAULT PASSWORD!!!

After you’ve changed the password go to the “Protocol” page and set your IP to be static. (special note to those running DD-WRT if your network is mostly dynamically assigned the IP’s if you set your server’s IP out of the normal range it will remain static and you don’t have to worry about collisions if another device takes it) Go ahead and set it for your network. In my example the IP would be 192.168.0.555 Netmask would be : 255.255.255.0 and Gateway would be the router at IP 192.168.0.1 and then click Save.

Now click the wireless tab and set your SSID to whatever your’s is, click save then do the same for your security tab. I won’t be of much help posting my info here as you should already know that information.

Now you can disconnect the power to the linksys print server and the Ethernet cable, move it to wherever your printer is located, and hook up the printer then power back on the print server.

Your Print Server is now ready to be put into action!

Now to get your Linux-Mint, Ubuntu, Debian or such laptop out and let’s get it printing!

Open your Menu and go to Administration>Printing. Select New>Printer. Once the Select Device window pop’s up, Select “Other” and in the “Enter device URI” window enter in this: [codesyntax lang="text"]

ipp://192.168.0.555/ipp/P1

[/codesyntax]

You should then be asked what type of printer is attached for CUPS to install the proper drivers, and then you should be able to print a test page! Your Linux install can now print wirelessly anywhere!

Now for Windows 7 users getting connected to the printer. First off, I recommend having already hooked up the printer to your system beforehand and have the proper drivers for your printer already installed it just makes things easier.

Click your start menu and select Printers and Devices. Then right click inside the window and select Add a new printer, then Select Networked Printer. It will start scanning for attached networked printers, but it doesn’t find mine so I just click stop and select the “The printer that I want isn’t listed.”

Select the radio button that says”Add a printer using TCP/IP blah blah blah” and click Next.

For the Hostname enter in your Print Server’s IP of 192.168.0.555 and click Next.

Let it query the Printer for drivers automatically.

The Additional Port Information needed window should pop up just keep it selected at “Generic Network Card” and click Next. Select your printer from the drivers list and click next, if you have already installed them just keep the one’s you have (it says it’s recommended anyways)

Then just name your printer (I like to add “(NETWORKED)” to the end of mine to keep it easily identifiable) and you should be able to print a test page to confirm that everything works! (I have it set as the default printer. It’s up to you if you choose to do the same)

And now you should be able to print from both new OS’s using the Linksys WPSM54G wirelessly! Phew!