Saturday, 9 July 2005

Tweaks and Filters

Been poking at Friday this week. I was getting a USB extension cord for work so I picked up one that glows red and hooked that up to Friday. It's sweet! And then the old plain one went to work. I also poked at GDM until I figured out how to change the login screen for Friday. My login screen now proudly displays the MDM flag! Heh, it's nice.

The other thing I dug up was firewall rules to block those stupid SSH dictionary attacks that keep flying around. Basically, a compromised host on the Internet attempts to login via SSH using a large number of common user names and presumably either no password or some guessable password (like "password"). If you check your logs you'll find that the attacks come in a big burst and generally all within 5-10 seconds.

So it turns out that the simple way to deal with this in a fairly effective manner is to rate-limit the number of new SSH connections accepted by the host with iptables. The rate-limiting allows a minimal number of malicious login attempts and also has a minimal likelyhood that it can be used for a DoS attack. The rules I use allow a burst of 5 (the default) and then a maximum rate of 10 logins per minute. The effect is that the attacker gets 5 login attempts then the rest get dropped until 6 seconds have elapsed and then the attacker gets 1 more login attempt every 6 seconds. During this time, a legitimate user may get rejected but they just have to wait a minute and things will be back to normal.

-A INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -m limit --limit 10/min -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j REJECT --reject-with icmp-port-unreachable


I've been using the above rules on both Siona and Nikita for a week or so now and it's been very effective and mitigating those attacks. It's NICE!

Sunday, 3 July 2005

Mmm Mac!

Heh I gots to twiddle with some peeps Macs on the weekend. An iBook and iMac (14" w/ G4 and 17" w/ G5 respectively). They were cool. From the iBook, we played around with the neighbour's wireless router settings. The thing didn't have a password so we were just trying different channels and stuff to see if we could get a better signal. Not a lot of luck though. Seems that channel 6 was no less noisy then the others. Oh well, them's the breaks. Now I just need a wireless doodad for Friday...

Friday, 24 June 2005

Hate Windows so much...

So windows has managed to screw me even in GNU/Linux. I got one of those generic Linksys Wireless G PCI cards from a co-worker. So I slap that badboy in the machine and start looking around online. Turns out, Linksys doesn't vend anything for GNU/Linux (jerks) but there's a utility the Linux community uses called "ndiswrapper" which lets a person install the windows driver.

Great! Linksys is lame, but we can make do. Ah! Not so fast, sparky. See the catch is that I'm running a 64bit environment. Any modules I load in to the Linux kernel have to also be 64bit. Since there's no 64bit Windows for consumers, Linksys certainly doesn't make such a driver. Well WTF?!?!? Just compile it with freaking -arch x86_64 and away we go already! No such luck. Windows, the pathetic and decrepid OS that it is has ensured not only its own stagnation but also stagnation in certain hardware vendors as well. And I'm looking at you, Linksys. You can eat my ass.

So screw Linksys. I'm off to find a hacked driver or else a vendor that actually, you know, supports what is rapidly becoming the next major generation of processors. Those linksys bastards...

Wednesday, 22 June 2005

A network without wires is great...

Because you don't have to worry about it, you know, working. Okay not quite true but at any rate, with Wendigo coming back home tomorrow, I really have to get the LAN here sorted out. There's no such thing as a wireless bridge (for consumer use anyways) and many of the access-points (probably same thing as a bridge) are discontinued. Sucks! Now *supposedly* a person can bridge routers. I have yet to find any supporting documentation. It would be nice if I thought it was going to be any good but the home-wireless stuff out right now just sucks so it's a matter of mitigating the problem.

Tentatively, I'm going to just put a wireless card in my PC. That's possibly one of the more effective solutions. The other part of that is I need to be sure that if I get, say, a wireless G card, I'm not going to have any problems connecting on 802.11b instead. The other trick will be to load linux onto the router. The handful of my coworkers that have gone that route have had great improvements in reliability over the standard firmware. That's on the WRT54G. I have a BEFWS114, or whatever it's called. That will be a matter of seeing if I can get a mini-linux to work on that model of router.

Basically, wireless sucks. Computers suck too. I hate everything. But I'm a sucker for pain, so bring it!

Sunday, 12 June 2005

TLS

Looks like the latest postfix package for Sarge includes TLS support. Powerfully sweet. Now if only I could get the LDAP directory up then I could start working on the Kerberos server and all that good rot, wot?

Saturday, 11 June 2005

Friday is Back Like a Bad Sequel

Woo! Friday now has a working video card. Hopefully, this is the last hardware failure that fucks me around for a while. That would be nice...

In sortof related news, I wandered into a couple stores with a friend who was looking at a laptop and holy smokes are those things ever cheap. You could get a Sony Vaio for 1300$ that would have a mobile processor, ATI mobile video, half-gig RAM, wireless networking. The Mac iBooks were 1650 for the 14" display iBook with the usual fixin's. Pretty cool. The other thing we looked at was printers. They were pretty neat in the 100-200$ range. There are a variety of combo devices (scan, print, fax) that were cool enough that I would have bought one... Except for the fact that the idea of printed material gives me the shivers.

Others, it's all good. Or something. Did I mention there's a 64b Debian Sarge distro now? Apparently 64b package support isn't complete yet but that's still pretty cool.

I'm still tired so I'm going to put some shitty posts up for my shitty course, get some food, watch some teevee, and go back to bed.

Wednesday, 8 June 2005

More Damage

Shortly before moving, Friday took a crap again. So then we moved. Move went fine, bbb, whatever. After moving, I poked at Friday and it was bizarre. Press "on" and she, well, you know, didn't turn on. The LEDs on the various components would flicker on briefly and then nothing would come up.

Naturally at this point I assumed my PSU was the source of all my problems. This is the third batch of core components that have gone to shit. In this case, the mainboard manufacturer did recommend a bigger PSU then I was using anyhow (I was at 350W and DFI said to use at least a 400W). So pop out the old and in with a new one (485W). Same problem.

Well, during all this, pulling the video card would let the system power on so I figure, maybe it's the video card that got cooked off. I don't have any extra PCI-E video cards (do you?) and the board doesn't have an AGP slot but I do have PCI video cards. In goes an old ATI 64b MAXXX (or whatever that thing is called) and she works fine. Woo! What this doesn't tell me is whether it's the PCI-E bus or just the card.

Check my papers and I had bought the video card less the 30 days ago so into the shop we go. I give it to The Guy who comes hither when I shout "RMA!" and he checks it out. Sure enough, video card is fuxxored. Vendor will replace it. Woo! Now I just have to wait for the replacement card. Theoretically it is possible the mobo is damaged as well. We shall see, we shall see...

In other news, since I haven't really been updating anything interesting lately, I've been playing with a lot of fun packages. Specifically clamav, TLS support in postgres, and snort.

CalmAV is an anti-virus for the mail server. I haven't seen it bounce any virus infected emails. Then again, I don't get that many. At any rate, installation was easy in Debian. apt-get install clamav. I think that was it. I was prompted for mail domain and such, or maybe not. Whatever, it wasn't a big deal to install but it doesn't seem to do anything. Hard to say.

TLS support in postgres is totaly sweet! The trick was making proper self-signed certificates. Well, google was a big help there. With a couple pokes at the config file, I now have TLS supported but not required. In my email client, Thunderbird, I just went to the Outgoing mail section and selected "use StartTLS" and that was it. I can use a secure channel to deliver mail. Hella sweet. The setup was easy but I wouldn't say trivial. Definately cool though.

Snort, ah, you gotta love the pig. I have to admit, the debian package gives you a tight setup. Just apt-get that bad-boy and away you go. I started getting daily snort reports and naturally there were some alarms that weren't useful (someone accessed a PHP page!) but it was easy to tune snort. Under /etc/snort there's a rules directory with one file per group. There were about three alerts coming from the web-php section that I didn't need flagged so I commented those out, HUP'd snort and that was it. Now I get reports on attempted hacks, directory traversals and such, in nice tidy daily reports. Installing snort is definately hella sweet.

Popular Posts