Archive for the ‘Debian’ Category

Incredible Linux server Vulnerability – Fork Bombs and protecting yourself against them!

Tuesday, November 24th, 2009

I only recently learned about Fork bombs. The idea is that a user who can successfully log onto your server will run a simple program that will tell the server to run more simple programs– these programs may do nothing malicious by themselves, but when they keep creating more and more kids, your server’s resources will dwindle until the server has nothing remaining to operate with.

This VERY IMPORTANT POST about limiting user’s process/RAM Limits will help you guarantee that users will find it hard, if not impossible, to abuse the system with a fork bomb.

I suggest you read the above posts and immediately secure any Linux servers you are running!

Burning Images (ISO) from Floppy Disks in Debian Linux

Saturday, September 19th, 2009

Recently, I just got some Legacy software. Woo!
On floppy disk. What is this, 1990?

So, my beta/Old PC was the only one that had a disk drive. And that computer had Debian linux.

So, let’s get these to my pc!

Step 1:
Make sure the floppy drive works.

mount -t vfat /dev/fd0 /media/floppy0

If that says something like

mount: /dev/fd0: can't read superblock

, then open up your computer and make sure that the floppy drive works. This happened to me, and apparently I had forgotten to.. well.. hook up the drive.... remember to do that.
SU up to root in case you can’t mount.
Tip: you have to specify a filesystem format when you mount the drive. -t is the switch that does so.

Step 2:
If the above step works, you’ve mounted the drive. You’re going to need the following two commands:

  • md5sum – but only if you have more than one disk involved with your ISO burning work.
  • mkisofs

md5sum is to help you verify that, when you are mounting and unmounting disks, that your unmount attempts are working.

how to install MD5sum on debian linux

apt-get install isomd5sum

How to burn ISOs in Debian Linux– required step: install mkisofs

apt-get install mkisofs

OK. So now that you have the required software,

Step 3:

mkisofs -r -o /path/to/desired/ISO/file/newFileName-0.iso /media/floppy0

The above step creates the ISO file.
Then, umount your disk. Make sure to leave the /media/floppy0 folder if you were just in there! You can’t unmount a folder you’re in.

umount /media/floppy0

Repeat step 1 as many times as necessary.

Step 4: (optional)
Use md5sum to check the MD5 of a file. Do this with the ISO files you want to compare.

~# md5sum /path/to/desired/ISO/file/newFileName-*
a583c9cc94c11d0e35b4967b79f979a0  /path/to/desired/ISO/file/newFileName-0.iso
7f15179dbc68c18b2f91ecd9365b7c70  /path/to/desired/ISO/file/newFileName-1.iso

If you have more than one matching MD5 answer (first column), the files are likely to be the same.

Step 5:
Make sure to unmount the last disk, and then transfer your files to your destination computer.

Stay cool, viewers!

The URL I used to help myself with this:
http://vertito.blogspot.com/2007/08/iso-creation-and-cddvd-burning-from.html

Configuring Syslog (Syslogd) on Debian to Automatically Accept Remote Logging on reboot or on restart

Friday, August 14th, 2009

I wanted a Debian linux server to become a remote logger for another Linux host.  I had edited this other remote host’s /etc/syslog.conf to have a copy of all its logs sent to a remote server.

However, this remote server was not accepting information as I had requested.  Sure, I could restart the service with the desired parameters, but it wouldn’t stick around after a reboot!

That is, until I found this post on how to edit the parameters of the file in Debian Linux.

Simple as pi!  Edit the /etc/default/syslogd file and include the -r parameter!  Now I remote-log by default.  Works great!

I also edited my /etc/hosts file to include the server I am receiving logs from.  That way the syslog file is less messy!

Need to get NetGear WG111v2 running on Linux / Debian ?

Tuesday, May 5th, 2009

Here are some helpful links I used to fix my Debian-running-a-USB-wireless-stick problem:

This thread on NDiswrapper, a way of using Windows XP drivers on Linux, helped me a lot with my NetGear WG111v2 Problem on Debian Linux..

Afterwards, this article at the Debian Wiki on how to use WIFI / Wireless utilities helped me out afterwards with my NetGear WG111v2 problem.

Anyways, Make sure to apt-get install openssh-server and configure it to your needs. Did you get IPtables, too? Should come with your package of Debian.

Me? Well, I’m fine. Just playing some indie games, drawing, etc. :)

Edit: Update as of 11/24/2009: It’s been working fine. I wanted to leave a bit more information about this.

  1. Here’s a copy of my /etc/network/interfaces file:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    allow-hotplug eth0
    iface eth0 inet dhcp
    
    # My secondary, Wireless Iface
    
    auto wlan0
            iface wlan0 inet dhcp
            wpa-ssid WirelessNetworkNameExactly
            wpa-psk password
    
  2. Keep in mind I got NDisWrapper installed with apt-get, got the drivers for the WG111v2. When NDisWrapper was working with the windows drivers for the WG111v2, it detected the wireless device.
  3. A GREAT idea would be to configure the router/wireless router to do a “DHCP Reservation” for each Mac Address that requests an IP Address from DHCP. this is because DHCP will change the IP address of your server in your local network once in awhile! This means that the IP address it had before may not be valid at the next time it reboots! Ergo, you should either ALWAYS find the IP address of your server from your router’s DHCP clients table page, log into the server manually and do ifconfig to find out what the IP address is, or you should set up a DHCP reservation so the IP will never change.

EDIT Mar 18 2010:

The following debian page also helped on NDISWRAPPER: http://wiki.debian.org/NdisWrapper