print_r($recent);

Array
(
 [545]=>Collections
 [544]=>Good morning
 [543]=>You know the fee...
 [542]=>Date more, care ...
 [541]=>Moving On
)

 

RAMCal(date('my'));

December 2008
sun mon tue wed thu fri sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
             
archives(RAM);


print_r($newStuff);

Array
(
 [RAndoMness]=> 28Sep09
 [JPsDocs] => 22Feb09
 [JPics] => 10Dec11
 [frontpage]
 [FeedBack]
)

recent music
Boycott SONY

print_r($background);
Array
(
 [today]=>
 [past]=>backgrounds
)


getentries(02Nov07);   getentries(01Dec08);

printentries(25Dec08);

iptables fun
added Thu December 25 2008 at 4:14 AM
0 comments

I was getting a Network Timeout Error (The server at x.x.x.x is taking too long to respond) when trying to connect to my tomcat port (x.x.x.x:8080). java was listening on that port (netstat -tnlp), but it turned out that my iptables was set to aggressively block anything that wasn't explicitly allowed. While I was researching how to unblock it (it's been awhile since I played with iptables), I saw someone explain how to redirect from port 80 to port 8080 (I think I used sudo iptables -t nat -I OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080 - DON'T RUN THAT). I thought that sounded cool so I tried it without success. Eventually, I found the right answer (sudo iptables -I INPUT 3 -p tcp --dport 8080 -j ACCEPT).

It wasn't until the next morning that I found out the extent of the damage I had caused. I was trying to install some other software using apt-get and I kept getting a bunch of 404's. Now, at first I thought this was related to upgrading to the latest version of ubuntu (which was a problem earlier with very similar symptoms), but I was already on the latest version. After pounding my head against the wall for a while, I tried downloading other files from my server, to no avail. Eventually, I tried a simple URL at the root of a server and noticed that it was returning the default new tomcat install page. That's when it hit me that I had accidentally forwarded the OUTPUT port 80 to tomcat instead of the INPUT port 80.

At this point, I realized that my iptables was kind of a mess and I didn't know how to recover it using actual iptables commands, so I backed it up using iptables-save > /tmp/iptables.txt, deleted the lines that referred to the really stupid nat rules and loaded the saved iptables back using iptables-restore < /tmp/iptables.txt.

Looks like it worked, YMMV.



Three Inches
added Thu December 25 2008 at 4:40 AM
4 comments

I've been meaning to write for about forever, but I kept procrastinating. I originally planned on writing a snarky piece about how three inches of snow shuts down Seattle. While it's rather funny that such a small amount of snow can really affect this city, the snowstorms we've had since have definitely made the damage of three inches pale in comparison.

The first snowstorm came last Wednesday night/Thursday morning. I worked from home on Thursday because I already knew that Seattlites were pretty crazy when it comes to snow. I figured that I'd give it a day to let it all settle and I really needed to go into the office on Friday. It took me an hour and a half to get to the office by bus that morning (normally takes a little more than half an hour). The roads were still a mess. Buses were running late if they were running at all. Firetrucks and ambulances were running pretty much nonstop. The whole situation seemed like a comedy sketch. All for three inches of snow.





There's more to read. Read the extended entry.