Thursday, May 31, 2007

ZyXEL ZyAIR G-202 in linux

Finally I managed to by a ZyXEL ZyAIR G-202 USB wireless stuff (I was searching it for 2 days!). Unfortunately the rd1211rw module in the default Ubuntu kernel isn't supports yet my device (Vendor=0586 ProdID=3410, chip=AL2230_RF), but with the 2.6.22-rc3 kernel it works perfectly: wpa, network-manager, kismet, all!:)

I compiled the new kernel with the help of How To Compile A Kernel - The Ubuntu Way on Howtoforge. I used to compile kernel by hand, but this "Ubuntu way" also works. It took me to 3 hours to compile the Ubuntu configured kernel (tons of modules) and the process used up to 3G of disk space. So be prepared before you do it.

I would like to say a big THANK YOU to the guys at Linux Wireless because they made this cool module for us!

UPDATE: Also check out my ZyXEL ZyAIR G-202 in Ubuntu Linux, a step-by-step tutorial!

UPDATE: in Ubuntu Gutsy Gibbon 7.10 it is supported by default.

Wednesday, May 30, 2007

trickle the bandwidth shaper

It is a portable lightweight userspace program to limit your programs bandwidth usage. Trickle is a user space bandwidth shaper. It allows you to limit the bandwidth consumption of a program without requiring all kinds of kernel patches, firewall configurations or root access to the machine on which you wish to use it.

It has two modes: stand alone mode and daemon mode.

With standard mode, you can limit one applocations bandwidth, for example:

[stone@eldorado]~$ trickle -d 20 -u 20 wget \
http://ftp.yz.yamagata-u.ac.jp/pub/linux/ubuntu \
/releases/7.04/ubuntu-7.04-desktop-i386.iso

With the daemon mode you can limit all of your TCP bandwidth, for example starting with:
[stone@eldorado]~$ trickled -d 20 -u 20

You can grab it from
http://monkey.org/~marius/pages/?page=trickle

Wednesday, May 23, 2007

Linux Wireless

I am planning to switch from my PCMCIA wlan cart to an USB one. It's because I don't like my current card, it is sometimes not working, and it is non deterministic... and for an USB card I can use long cable so it is more flexible.

I googled a bit and find http://linux-wless.passys.nl/. It is a wireless card database for linux. You can check card in it for support level, drivers, an so on. It's a great site!

Zyxel ZyAIR G-220 looks good to me, so I maybe buy one this week.

Friday, May 18, 2007

Let's extend battery life with PowerTOP

From 2.6.21 the Linux kernel has no fixed timer tick so the battery life is made bigger in theory but this and that can ruin this, but Intel made PowerTOP for us. This tool can give you information about the consumption and give hints about how to lower it.

Wednesday, May 16, 2007

Windows password recovery

If you forgot your windows password (XP, Vista, or anything else) try ophcrack LiveCD! It boots and tells you the passwords after a few minutes (it uses rainbow tables). You don't even have to touch the keyboard. Works on Vista too! It's a great tool!

Tuesday, May 15, 2007

Ubuntu fails to hibernate when running on battery

On my Clevo M22ES laptop my Ubuntu failed to hibernate when running on battery. It hanged with black screen for most of the people, who already reported this bug. In my case there was some errors on it but it is from different source, it's because of my ACPI.

The solution was to disable laptop mode. To do this you I had to change

ENABLE_LAPTOP_MODE_ON_BATTERY=1
to 0 in /etc/laptop-mode/laptop-mode.conf.

Ubuntu CD from ShipIt

I got my Ubuntu CD a few days ago. I looks cool!:)

Monday, May 14, 2007

ssh ban after 3 incorrect logins for a while

My servers logfile is plenty of serial incorrect login attempts, maybe generated by scriptkiddies and so... there is a way to stop them.

With iptables', the build in firewall of GNU/Linux, state module anyone can make rules that blocks the other side for a while after the 3rd login attempt (ok, not the third login attempt but the 3rd SYN packet coming to the ssh port but is is on 99.999% time is the same).

Here comes the solution

iptables -A INPUT -p tcp --dport 22 \
-m state --state NEW -m recent \
--set --name SSH
iptables -A INPUT -p tcp --dport 22 -m recent \
--update --seconds 60 --hitcount 4 \
--rttl --name SSH -j LOG --log-prefix "SSH_brute_force_attack: "
iptables -A INPUT -p tcp --dport 22 \
-m recent --update --seconds 60 --hitcount 4 \
--rttl --name SSH -j DROP

The 3 rules above makes a new "table" where the firewall writes down every SYN packet's informations that comes to the ssh port and if the new packet is the 4th it blocks that machine for a minute. Old entries are removed from the list after 60 seconds.

Sunday, May 13, 2007

Garmin GPS + VirtualBox USB

I managed to get my Garmin GPS work with VirtualBox, the solution was that before every use I had to disable and re enable the Garmin GPS driver. I don't know what is the cause but at least it works so I can use my GPS till QLandkarte become capable to upload my commercial maps.

Wednesday, May 9, 2007

VirtualBox + USB

I installed VirtualBox on my Ubuntu box yesterday, to be able to use my Garmin GPS (the opensource way QLandKarte isn't working perfectly for my commercial maps.

The stuff is super! It is fast, and uses low resources. So I like it. I put on it that other "operating system", and it works perfectly.

If it complained about usbfs so I made the trick to make it working. You have to edit /etc/udev/rules.d/40-permissions.rules and change the line

SUBSYSTEM=="usb_device",                MODE="0664"
to
SUBSYSTEM=="usb_device",                MODE="0666"
and USB will work perfectly.

Unfortunately my Garmin GPS still not working, but my pendrive, and Canon camera rocks.

Tuesday, May 8, 2007

Gentoo Linux 2007.0 -- Secret Sauce

The new version of Gentoo Linux is released.

It includes a completely rewritten version of the Gentoo Linux Installer on the AMD64 and x86 LiveCD and LiveDVD images. It also includes GNOME 2.16.2, KDE 3.5.5, Xfce 4.4, Mozilla Firefox 2.0.0.3, OpenOffice.org 2.1.0, and the 2.6.19 Linux kernel.

On x86, updated hardware support, many updated office and productivity packages and GLIBC 2.5 is included. It also provides both hardened and non-hardened stages in this release. Hardened stages are still using GCC 3.4.6 and GLIBC 2.3.6 but it's possible to upgrade from hardened to non-hardened stages.

See more in the press release.

Saturday, May 5, 2007

Ubuntu torrent stats

I am seeding all Ubuntu torrents since the release, so far 111G was downloaded from me. I only seed them at 100KB/s not to disturb my servers usual activities, but this speed is constant!:)

The most famous is ubuntu-7.04-desktop-i386.iso with 35142.9 MB, second is ubuntu-7.04-alternate-i386.iso with 24729.6 MB, third is ubuntu-7.04-desktop-amd64.iso with 20413.0 MB, the less famous is ubuntu-7.04-server-sparc.iso only with 2455.0 MB upload.

Friday, May 4, 2007

Get rid of mounted volume icons from desktop

Start gconf-editor, in terminal or with ALT+F2 run application window. Find /apps/nautilus/desktop and check out volumes_visible! That's all, easy isn't it?:)