iptables issues again

Well, it’s been another fun evening battling with iptables.

The goal is simple: allow access for specific things across the router, and drop/reject everything else.

Requirements:

Client connecting from specific IP must be able to connect on port 80 and be redirected to the transparent proxy on the same machine (done, tested, working)

Client connecting from same specific IP must be able to connect out on ports 25, 53(udp), 110, 143, 443, etc, unhindered (with space to reject more specifically later)

Reject/drop everything else from that IP.

Allow anything else traversing the system (or beginning/ending there) to be handled separately.

Seems easy enough, but it seems I can make one happen but not the other. But tomorrow is another day.

Retiring Bed Parts

You may recall that back in December 2010 Crash broke our bed. As a result, I built a new one to replace it.

This week one of Kelly’s friends gave us her old box spring that was no longer needed and after sleeping on it a couple of nights we’ve decided it was time to properly retire my one.

So now it’s in our second bedroom, waiting for a project to use the lumber for. Or something.

Expanding Upward and Other Train Things

According to NOAA, it’s 87 degrees outside. It’s 82 inside. Dear apartment complex, please decide to enable A/C some time soon. Thanks.

It’s been a good week, so far. Back to work on the new shift tonight (7pm to 3am, Wednesdays through Sundays), but progress has been made on various model related things this week.

Over the last few days I’ve been doing some research on a set of freight cars I have, and from what I can tell they are offset quad hoppers that were a real freight car – mildly surprising given my models of them were made by the likes of Tyco.

HoppersTo be specific, I’m referring to the brightly colored open hoppers often used for coal or ballast on a model railroad made by companies to include Bachmann, AHM, Tyco and possibly others. They seem to be most closely matching to a 70 ton ARA hopper that was used by several railroads on the eastern side of the United States starting from the 20s and 30s and stayed in production in a few forms through the early 60s. I’ve found several photographs of them painted for B&O, Reading and one or two others, but not much more. I’ve also seen several model maker’s sites referring to Norfolk and Western and the Southern Railway having some (and operating them through at least the early 80s, which fits my loose era of the 80s and 90s on NS) but I am yet to see any photos of them at all. If I can find some, I can consider repainting them into more realistic colors and possibly add to my fleet of Southern hoppers.

Also on the N scale front I finally started building out the hills (expanding upward!) using paper and glue. They’re just now taking shape and perhaps next week I’ll be able to start laying plaster and making them solid.

Building a Railroad Empire

A few months ago I started planning a coffee table model railroad. I even picked up some cherry wood from some friends to start building with, I just never got around to planning or designing the table itself. Instead I picked up a 2ftx4ft piece of MDF from the local hardware store and glued some cork and track to it, before it sat behind the piano for the next year or more.

However, after I started commuting to Herndon, I took a trip to Ikea after work one day and found the LACK table. I was already aware of the LACK line, as it comes up occasionally when talking about computer hardware – their small side tables are JUST right for mounting 19″ rackmount equipment in, and their smaller coffee table can be used similarly for full length servers.

Then I saw their larger coffee table – after some humming and pondering and measuring I determined that it was about 2 inches too short length-wise to fit my 2×4, so I took a tape measure to it and found I could take off about an inch at each end and make it fit. So I did. I also made a trip to the local Home Depot here in Reston and found a nicely warped piece of plywood that I cut a strip from and placed end-to-end as a divider (and then cut a portal for the track and train to run through). Last night I mounted it in the center and pushed it back under the table where it’s sitting and running quite happily as I type.

I also picked up a pair of tunnel portals and some other scenic effects for one side – it’ll be a country scene with the track weaving through a wooded area. The other side will require a little more planning – the idea is a night-time scene through a small town or city. TBD. I’m excited to play with lights on streets and in buildings, etc.[Photo: Kelly]

 

It Boggles My Mind..

I saw a post on Reddit earlier comparing a computer hard drive from the seventies with one from more recently. Whenever I see these, I always think of the old 5MB drive IBM built in the 50s. It gives me great respect for the 32/64GB MicroSD cards that we have today for a comparative few dollars and are about the size of my thumbnail.

So I decided to do some math.

A 5MB drive at $10k per MB works out at $50,000.

I can buy a 4TB drive on Newegg for $300.

That’s 800 times more storage, for less than 1% (0.6% to be more accurate) of the cost in just over 50 years. And I can carry several of them at once.

In fact, now I’m curious. Let’s do this from a few angles.

Compared by mass:

According to Western Digital, their 4TB drive weighs 1.72lb. According to Wikipedia, the IBM RAMAC 350 weighed in at 2,140lb. So the RAMAC weighed the same as just over 1244 4TB drives. So in the same mass as the RAMAC (ignoring dimensions for this exercise), you could store nearly 5PB (4976TB?) of data, at a cost of $373,200, although I suspect that you’d get a volume discount if you bought that many drives.

Compared by price:

Back to the same numbers as earlier, the old drive cost around $50,000. At $300 per drive, I could buy approximately 166 drives for a total of over 660TB of storage. That means per dollar, our cost of storage has improved to somewhere in the ratio of 132800000:1, if my math is even close to right..

Compared by physical size:

According to Wikipedia again, the 350 was 60″×68″×29″. The 4TB drive is (rounding down to 1 SF) 1″x5.8″x4″ So let’s pick a direction and go with it. What do you know, 29 divides evenly by 5.8, so there are 5 in that direction. 68 divides by 4 to the order of 17 times, and 60 divides by 1 for a result of 60. So 60x5x17=5100. 5100 drives in the same physical volume of space. Forgetting our need for cabling, that would give us storage of over 20PB of data. Having cost $1.5 million.

Purpose for these numbers? None whatsoever. I was just curious to compare more than just the obvious size differences. Maybe I’ll get bored enough and calculate the same for MicroSD cards. I’ll leave you to ponder the numbers while praying I find something better to do with my time!

A copy of the C library was found in an unexpected directory

Sorry guys, tech related post.

I had an issue on one of my OpenVZ VMs for a long time that I just never bothered to fix. Today I logged in and took a whirl at fixing it, turns out it was really simple.

I run Debian, and a dist-upgrade on this server would consistently fail to upgrade libc6 with the above error, complaining about libc6 being exactly where it was supposed to be. I found the solution on ServerFault, with thanks to user “holms”

Here is the fix:

cd /lib/x86_64-linux-gnu
mv libc-2.13.so libdl-2.13.so libm-2.13.solibpthread-2.13.so librt-2.13.so /root
LD_PRELOAD=/root/libc-2.13.so:/root/libdl-2.13.so:/root/libm-2.13.so:/root/libpthread-2.13.so:/root/librt-2.13.so bash
apt-get -f dist-upgrade

Once this is done, no further problems should be experienced!

How it works:

Apt/dpkg was failing because it was finding the files in a place it didn’t like them, but simply removing them breaks things. By moving them to /root and then using a variable to tell bash where to find them, things worked while the upgrade happened and the upgrade was happy not seeing the files in /lib/x86_64-linux-gnu. Which also makes me happy!

Relocation, Relocation, Relocation

Wow, I really need to update more. Perhaps with the upcoming changes, which are fairly few but not at all insignificant, I will have more time to reflect on life and more opportunities to write about.

In October of last year, I took a job that was almost literally 100 miles away (door to door, depending on my exact route, it’s between 95-105 miles). It was a big change: I was moving from a Software Development and Quality Assurance team, into a Systems Support and Administration team. For me it was important because I was leaving SDQA, something I like but don’t enjoy (at least not full time) and getting back into IT. The learning curve has had it’s steep points, and so far I’m still happy to go to work.

That said, it was always in the plan for Kelly to find a job in the area and for us to find a home much closer to work. I don’t mind driving, but 200 miles a day gets a little old, and certainly eats into what little was left of a social life, after being assigned to the 3am-7am shift, on Saturdays through Wednesdays.

And she did! It seems perfect for her: just enough kids interaction to be fun, and enough of everything else to balance it out. And the more she talks about her supervisors and bosses, the more it sounds like they feel the same way.

For the last month or so, she’s stayed with one of her college friends in Reston while I commuted back and forth. On Wednesday we take the keys for a one year lease on an apartment just around the corner. Her commute to the library is about 30-40 minutes, sometimes more, sometimes less, depending on time of day and traffic. Mine will likely be 10-15, maybe 20 at maximum. For an affordable price, we found an apartment complex that will let us bring our monster dog and still has space for all of our things.

That makes this packing week. So many things to put in boxes, only to take them back out again. Granted, there is a truck ride in between the putting in and the taking out, but shh. I suppose the good news is that our room is finally starting to lose shape. Most of what is left to pack are clothes and other little things getting put into “Miscellaneous” boxes.

And as if moving 100 miles from where we have lived the last 4.5 years (so many thanks to Tammy and Randy, so many) wasn’t enough, in the next couple of weeks I’ll be rolling my shift back. I’m yet to see the exact details, but I understand it will involve a week of 11pm-7am, and then 7pm-3am for the next three months. It sounds weird, but I actually like the idea. Again, largely missing out on social life (except for Monday/Tuesday) but it’s really not that different from my “ideal schedule” anyway. Staying up late, sleeping late, sounds good. And SO much better than waking up at midnight to go to work. There’s something just wrong about going to bed in daylight and waking up in darkness.

It’s a lot to think about. Taking responsibility for absolutely everything again, the roof over our heads and the lights we see by, we pay for directly. Getting used to having a really tight budget again. Having time to do things outside of working, sleeping and eating (and driving). Having a more normal sleep pattern. Not spending my days off from work worried about messing up said sleep pattern, and making myself a danger to myself and others on the road as a result.

I’m excited.

Adjusting

12:46am, Thursday January 3, 2013.

That’s going to be weird, 2013. It’ll take another month, and then it will feel normal, but until then, it will be hard not to just type or write 2012. One of many changes this week.

I also have another eight hours before I will allow myself to sleep. My work project this week is to move my sleep schedule so that I can work 3am-11am, Saturday through Wednesday for the next two months. I have 3 Red Bulls remaining, and 7-11 is a short drive away should I need anything that isn’t already in the house.

Not so much an adjustment, but a change nonetheless, I managed to successfully change the oil in my new car for the first time today. It was a few hundred miles overdue, but after much wriggling under the vehicle I finally emerged victorious. I must say, Honda did make it very difficult to get to the filter in that model – it was a perfectly reasonable and logical place on the engine and then they put all the front-wheel-drive junk in the way. So it’s impossible to reach from the top, and almost impossible to reach from the bottom.

My only problem now is what I’m going to do for the rest of the night. I don’t trust myself driving very far (and Kelly wouldn’t approve even if I did), but I need to do something or I’ll put myself to sleep out of boredom. Oh well, I suppose that is my problem to solve. Maybe I’ll make Infinitely-aLive properly IPv6 supported, or something.

Road Rage

 

For the last month I’ve been commuting to and from Northern Virginia, by state and national highways. Because of mechanical issues at high speeds I have been avoiding the interstate system, meaning I am often on 2-lane roads (one each way) through middle-of-nowhere towns. Over the course of this time I’ve come across several small frustrations which I would like to address.

DISCLAIMER: This post contains some language that people may consider strong or unnecessary. I’ve tried to limit it. I don’t use it liberally, but in an effort to emphasize a point. Chances are, if you’re old enough to drive, you’re old enough to read this.

Continue reading

China’s High Speed Rail

Below are some cool photos of China’s High Speed Rail network that I received via email today. I was intrigued, however, by a comment at the bottom.

It read as follows: “HOW DID THEY DO THIS? THEY COPIED THE USA IDEAS OF THE 40’s & 50’s AND COMBINED THEM WITH TODAY’S TECHNOLOGY”

Here’s my quibble with this statement. In the 40s and 50s America and Europe were both big into rail transport and the networks weren’t doing too badly. But the whole thing with “progress” is that things don’t always stay the same. Things are replaced or upgraded. In the case of Europe, they elected to subsidize public rail transportation options and thus the Swiss have great public rail transport, the French have great high speed rail transport with the TGV, as do the Germans with ICE. Even Great Britain is doing pretty well with their HSTs and the Eurostar and other similar trains.

But the United States elected to neglect it’s passenger rail system in favor of cars and planes. In the 70s several passenger routes were doing so badly that the government had to step in and save them – a decision which is still debated to this day – forming Amtrak, a thriving railroad in the North East of the country, but that’s about it. Everywhere else is underutilized and largely noncompetitive against road or air options.

So yes, it’s probably true to state that China’s High Speed Rail is a “copy” of the USA’s rail system of the 40s and 50s, but it’s more accurate to suggest they took the ideas of Japan, France, Germany and Great Britain and did their own thing. It’s hardly fair to blame Communist China for copying the discarded ideas of Capitalist America.

Anyway, enough ranting. Here are some cool photos showing how far China has come in it’s development of high speed rail, setting the standards high for sure.

Continue reading