Stopping DOS Attacks with Mod_Evasive
avatar

DOS attacks are becoming very common these days.  There are many different levels of DOS attack and monitoring your system and trying to prevent them all can be a full-time job.  However for the causal user you can easily add some basic DOS protection without much effort, especially if you are using Fedora or CentOS.

Fedora and CentOS both have mod_evasive in their main repositories so to install this you just need to run:

yum install mod_evasive

This mod comes basically ready to run without any modification.  I like to make a couple of changes to the settings so I can receive notices when a block is taking place.  To do this you just need to go to your apache conf.d directory and edit the mod_evasive.conf file.  To recieve email notifications when someone is blocked just enter your email address in the field DOSEmailNotify.  All of the other settings are fine the way they are.

Posted in Apache, CentOS, Fedora, Guides | Tagged , | Leave a comment

Easily Upgrade Fedora
avatar

One of the downsides to using Fedora is that every six months there is another major release.  This can be annoying to keep up with but luckily Fedora has made it easy with the preupgrade command.

All you need to do is type in preupgrade at the command line interface and you will have a program pop-up on the screen which will upgrade your entire system automatically.

Posted in Fedora | Leave a comment

Working with ISO from the Linux Command Line
avatar

If you have wondered how to create an iso from the command line, it is very simple.  You just need to use the following commands:

mkisofs -o <name of iso>.iso <directory to be iso>

To burn an ISO from the command-line many people do a DD, this doesn’t always work since it is technically not the correct way to do it.  To do it the proper way you would need to run the following commands:

  1. Determine the Device ID number by running the following command:

    cdrecord -scanbus

    * The device ID number will be x,x,x on the row which lists the CD/DVD drive you will be using.

  2. Next you will want to do the actual burning of the ISO to that device using the following command:

cdrecord -v dev=<Device ID from the scanbus command> <ISO to burn>.iso

Posted in Arch, CentOS, Fedora, Linux | Tagged , , | Leave a comment

Unlock An Account
avatar

To unlock a user in Linux is quite easy you just need to run the following command:

passwd -u <account>

This will unlock the account which has expired, but if you have turned on the advanced PAM Account Auditing you will also need to reset their account using the following command:

/sbin/pam_tally2 –user <account> –reset

This will reset the number of times they have incorrectly logged in so the account can be used again.

Posted in Arch, CentOS, Fedora, Linux | Tagged , | Leave a comment

Fedora 15 Default Run-level
avatar

There were many changes made to Fedora 15, one of the ones that I keep running into is how to change the default run-level of your box.  I use Fedora as a server OS in many situations because it offers some advanced features which CentOS either has out of date or doesn’t even include.  Since often these boxes run headless I just set them to boot to run-level 3.  The command below tells you how to do it:

ln -s /lib/systemd/system/<target name>.target /etc/systemd/system/default.target

Posted in Fedora | Tagged , , , | Leave a comment