Thursday, December 4, 2014

Weapons of Choice (at Work) : Logitech k740 Keyboard

I'm lucky enough to get work to furnish me with some sweet gear to hack away and make sure Facebook is up. Here's my review (and approval) of the Logitech k740 Illumiated Keyboard:

Pros:
  1. It will make everyone who stops by your cube jealous. It is that gorgeous. 
  2. It lights up. 
  3. The type experience is uber fluid. 
  4. It has a clear border about 1/4" thick. When you look through it things are magnified and basically hidden from view. This feature is pointless, but good looking. 
  5. You can customize the FN keys. Sweet.  
  6. Did I mention it lights up? Because IT DOES. 
Cons:
  1. The insert key is super tiny. 
  2. It makes everyone else so jealous they will try to steal it from you. 
  3. It doesn't angle up very much, maybe 3-4 degrees ... should be more. 


I give it 5/5 Chris Tacos™:




Scientific Linux Network is Default Off. Here's how to turn it on!

By default in SL7 and when using it as a virtual machine, eth0 (or your main Ethernet virtual NIC) is turned off for some God forsaken reason and you may find yourself constantly hitting this button to turn it on:





Open up a terminal and do the following to always have it on:


sudo vi /etc/sysconfig/network-scripts/ifcfg-[somerandomthingforyournic]

Change the ONBOOT line to yes

Noob Aliases I use on Linux

Living collection of all the command aliases I use (These go in /etc/bashrc if you want them permanent):

  1. alias sudoyum=’sudo yum -y’
  2. alias gccwall=’gcc -Wall’
  3. alias rpminstall=’rpm -ih’
  4. alias curlfox=’curl -A “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0”’
    1. The above makes NIPR think cUrl is going out as Firefox 33 on Win 7

How to make a SHA-256 ECC SSL Key and You Can too!

So, found out SHA-1 is being phased out in 2016 because hackers. Here's how to move to the super-mega-secure Elliptical Curve SSL key and a self signed cert with SHA-256 (Works in OpenSSL for Windows/Linux):

1. openssl ecparam -out foo.key -name prime256v1 -genkey
2. openssl req -new -sha256 -key foo.key -x509 -nodes -days 365 -out foo.crt

Note: prime256v1 is the NIST recommended standard for the Diffe-Hillman ECC key and right now is the ONLY one fully supported by all browsers and won't get you a "weak" score on the Qualys SSL test. Also, should be impenetrable until quantum computers become common in 20 years.

Stupid Windows Note: To make this a PFX file for Windows Servers (Or anything) use:

$ openssl pkcs12 -export -out domain.name.pfx -inkey domain.name.key -in domain.name.crt

Make Scientific Linux (Or any Red Hat) Yum Updates work on NIPR

We are moving to Scientific Linux for our Red Hat variant of linux on our DoD network and unless you have direct control of your firewall, you're going to have a bad time trying to get command line functions that depend on the web (Yum, cURL) working on NIPRnet.

This is normally due to most commands locking down the outbound on the firewall to specific "user agents". Normally, the only user agents allowed out to the web are for IE, Firefox, and Chrome. It's common practice in development land to "fake" a user-agent to test a website or application. In linux, this is pretty easy, in Windows ... not so much. 

Fortunately, someone (Emilio) figured out how you can modify the user-agent for Yum to update/grab any software packages you may need right here.

I've tried this on our SL7 on NIPRnet and it worked like a champ.