Connecting to VoidNet with irssi+screen

August 21, 2008 in IRC

One major client out there right now is irssi.  People who have used IRC forever, and who have brains use irssi.  People who are new to IRC and are being forced by one of the afformentioned people may have problems using irssi and screen.  I hope to help alleviate some of those problems within a couple simple steps.

READ THIS TOO: http://www.irssi.org/documentation/startup#c3

Step 1: The Final Solution

Since you’ve probably configured irssi incorrectly, the first thing you should do is log into your shell on whatever server you’re using screen+irssi from and do:

rm -rf ~/.irssi

What this will do is blow away any crappy settings you’ve got going. Since whoever configured your irssi probably didn’t care to do a good job on your instance, this is probably best.

Step 2: Configure irssi

Start irssi:

irssi

At the nice clean irssi window, type the following commands:

/network add VoidNet
/server add -auto -network VoidNet irc.easymac.org
/channel add -auto #VoidNet VoidNet [password]
/save
/quit

If you’re not an idiot you can probably figure that if the channel doesn’t have a password, you don’t need to specify the [password] part. If it does, then… well… you get the idea.

Step 3: Start, Name, Attach, and Detach Your Screen

The only functions you really need to know are screen creation, screen detaching, and screen attaching. They’re quite simple, but for some reason people who don’t know how to use screen like to create screens where they should be attaching existing screens.

So, the first thing you need to do is learn what screens are running!

screen -ls

If you see something like:

screen -ls
No Sockets found in /tmp/screens/S-username.

You’re in good shape. Otherwise, the action necessary is out of the scope of this document. Have fun.

Continuing on…. Let’s start a new screen, named IRC for the purpose of…. IRC!

screen -S irc irssi

OMG irssi is now running inside a screen named irc, wonderful!

To detach, but leave the screen running you need to do a keystroke. (ctrl+shift+a,d)

To reattach the screen simply do:

screen -rd irc

Yay, your irssi is good!

Step 4: Starting irssi At Server Reboot

You don’t NEED to do this step, but there’s nothing more annoying then when irssi isn’t started because the admin was a jerk and rebooted the server. So if you want to avoid that annoyance, it’s quite simple to do.

Edit your crontab using:

crontab -e

and insert this line:

@reboot     screen -d -m -S irc irssi

Dell PE SC440

August 6, 2008 in Blog

Dell SC440

I was going to start thinking about building a new server, but I can’t really decide what I’d get if I were to get one… I was looking at Newegg, but whenever I pick some hardware out that I’m satisfied with, the cost is astronomical.

So I decided to look at Dell’s stuff. I’ve seen that a few of their lower-end servers have gotten a bunch of good ratings, and since this is going to be a server for my use at home, I don’t really need anything crazy.

This server actually looks to be almost exactly what I need. I really don’t have the hardest to match criteria there is…

  1. It has to support FreeBSD perfectly, and I’ve seen that this server runs FreeBSD 7.0 very well, and since I’ve never had a problem with FreeBSD going on a Dell, I’m not worried anyway.
  2. I don’t want a junky case. This one seems to be cooled correctly, and just… clean.
  3. I don’t want to have to RMA stuff to Newegg anymore, because they’re just a pain in the ass. If this server needs to be sent back, I’ve dealt with Dell before, they’ll send me a new one as soon as possible, and I can send the problem one back with much less time wasted.

I priced out the pretty reasonable choice out of all this, and it looks like after shipping I’ll have payed about $600.00. Not so bad for a new server.

Oh, and I’ve got a 3ware raid card just hanging around, so that will suit this nicely. I just have to decide if I really want to spend $600.00 on anything right now.. :/

PieSpy Graphs

August 6, 2008 in Blog

I setup a few PieSpy graphs on Void Networks… Here they are:

#elasticmind

#voidnet

#notreally

It’s really a pretty neat graph to have, too bad the program is written in Java.

76764 uminac       3  20    0   225M 15976K kserel 410:26  0.00% java

Stopping SSH SPAM with PF!

August 6, 2008 in FreeBSD, Networking

If you’ve put a server accepting SSH connections on the internet you’ve probably noticed a TON of failed login attempts from various IP addresses and various (seemingly generic) usernames.  If not, you probably should have, and you may not be up to running a server if you don’t look at logs from time to time.

Either way, there’s a quick & easy way to try to stop these annoying bots or whatever they are from bugging your server with PF.  Basically, on your rule where you pass SSH connections in through the firewall you can set a ‘max-src-conn-rate’ or maximum source connection rate.  What this does is triggers something to happen when a host connects faster than a certain rate of allowed new connections.  In our case we’ll want to dump these users into a table that blocks everything from them.  So we create the table:

table <ssh-bruteforce> persist

The rule to drop people who are clearly spamming into our ssh-bruteforce table is:

pass in on $ext_if inet proto tcp from any to any port ssh flags S/SA keep state (max-src-conn-rate 4/30, overload <ssh-bruteforce> flush global)

Where the connection rate is 4 connections in 30 seconds (4/30).  From this point on, you just want to block them.  You can do that with:

block in log quick on $ext_if from <ssh-bruteforce>

Now anybody who tries to esablish connections faster than the rate specified in the pass rule gets dumped into that table, and blocked from accessing anything at all on your server.  :)

mhoran++

Well, here you go…

August 1, 2008 in Blog

I have no idea how to create a site that looks good, so I’m not going to.

This wordpress theme will do me just fine for now.

Copyright © 2009 Christopher J. Umina - Powered by WordPress - Portfolio WordPress Theme by ThemeShift.com.