Things I find Annoying…

December 15th, 2009

I freakin hate when there is an ad for something and they show a price and in tiny microscopic print they put “after pain in the ass to get split between 4 companies mail in get screwed on rebate” Why dont these companies stop doing this and they be the ones to deal with the mail in crap. I want my discount now, and I dont want some technicality like me forgetting the correct department to ship it too to end up costing me my nice discount that made me buy the item in the first place…

Next why are all these computer makers still pumping out PCs and shipping them with a 32b os? Then to top it off when you call them to get a copy of the 64b so all the memory your computer came with will be used some of them are telling you to bad. Seriously.. why would you sell me a laptop with 4G of ram then put an OS on there that will only report 3.25 of it as usable. Thanks. Should I just throw the other 768 in the trash? Why not just put a 64b system on there to begin with and make everyone happy.

Save a life

December 11th, 2009

So I got this thing in the mail the other day from this cancer research center. It had a nickel in it. On the front it said “Find out how this nickel can save the life of a child”. Im thinking to my self… If this nickel really can save the life of a child why did you just send it to me? I don’t need it… So I put it back in the mail “Return to sender. Please use said nickel to save a childs life”

Redirect MySQL Traffic on FreeBSD with PF and SSH

November 20th, 2009

So this week at work we were going to be taking a machine and splitting some server services off and onto smaller easier to manage virtual machines. One of the services this server was goign to stop serving is MySQL. As you may or may not know MySQL runs (by default) on a non-privileged port (3306). This is important to know later. This server was pretty old. Its was running FreeBSD 6.0 This server has been on the same IP running the same services for more years than anyone in IT can remember. This means there are going to be TONS of scripts all over the network that over the years have been long forgotten about, so when we move MySQL off and onto the new stand alone system we are going to have to go all over trying to find broken scripts and point them to the new DB server… Or are we?

I was thinking I should solve this problem before it fills our ticket queue 🙂
I decided to use PF since this system already had it. This server only had 1 NIC and we have more we could add but we cant have down time so I needed to figure out a way to do it with only 1 NIC. The solution I came up with was pretty simple and used only things that are available on a default install of FreeBSD
First I used ssh to do a simple port forward so that connections on the old servers localhost port 4040 would forward over an ssh tunnel to the new servers port 3306

ssh -L 4040:localhost:3306 dbproxy@newserver

Next I added a rule to my pf.conf

rdr pass log on $int_if proto { tcp, udp } from any to any port 3306 -> port 4040

This rule redirects traffic headed to port 3306 on the old server (any interface l0 or em0) to port 4040 on the loop back interface, where we did our non privileged port forward with ssh.

Then a simple reload of my pf.conf and now Im all setup and dont have to worry about those scripts around the network, and the fact we log this rule we can now make a simple parser for our pflog to find out which hosts are using it and then go find the scripts and fix them with out having to have a ticket to do it first.

I would also like to mention that MySQL offers a solution to do this as well called the MySQL-proxy. We could not install that on this machine though.

You can see the thread on the FreeBSD forums where I originally posted the problem, and solution:

Have you tried rebooting your computer?

April 11th, 2009

I have recently gotten into this awesome show called The IT Crowd. Its really funny. I thought I would share with you a really funny clip from season 1.

South Park does it again

March 31st, 2009

Well the guys at South Park did it again. Here is a classic clip from a recent episode of South Park