Main menu:

Site search

Categories

Archive

Archive for 'Linux'

How to disable DNS recursion on linux

By disabling recursive lookups on your server, you will help in the never ending battle against SPAM… 1. SSH Into your Server 2. Do a nano -w /etc/named.conf 3. Search for // query-source address * port 53; 4. Type Recursion no; 5. Save and Restart Bind

emacs commands…who can remember them all?

This is a long…long…long list of comands for emacs.Emacs Commands List C = Control M = Meta = Alt|Esc Basics C-x C-f “find” file i.e. open/create a file in buffer C-x C-s save the file C-x C-w write the text to an alternate name C-x C-v find alternate file C-x i insert file at cursor [...]

monload2

there is a great utility that will help to monitor and control processes on a linux box called monload2.  It can be found at http://www.dei.isep.ipp.pt/~andre/extern/monload2.html  from the site… The monitor program – how it works We first address the high load mad process problem, that was easy, from time to time we run the ps [...]

changing a host name in WHM

while WHM gives you a fun menu item to change the hostname, be warned, it does not always work right…  After putting in your new host name you might geta message about adding a A record and once you hit ok you might then get a BAD LICENSE FILE or similar massage….  do not fear, [...]

looking for space hogs?

Here are a few commands strung together to find all the files that are more than 1000000c in size. What is 1000000c? That would be character (unbuffered) special find /var -size +1000000c -exec ls -l {} \;  a variation on this is to find large files that have been accessed in the last day find /var -type [...]

Too many tables

If you have a database with thousands of tables, mysql can be a pain when changing to use the database.  Try starting it up with the mysql -A option instead.

Summarize DU in a more useful manner

DU is used to calculate the size of folders, one of the problems with it though is that it does it for all subdirectories by default.   Try putting this into a file and making it executable to shortcut getting just the size of the most immediate subdirectories. du -sm $(find $1 -type d -maxdepth 1 [...]

rkhunter to the rescue

There is a tool that I highly recommend running on any Linux box to help detect problems and root kits, rkhunter. It is available via http://www.rootkit.nl/ What makes it a must have is that you can automate the running and updating of the package, and have it send you daily reports of what it finds. [...]

Anti-Leach with .htaccess

Anti-Leach tutorial. If you need to prevent people from linking to your image from other web sites this can be accomplished in apache via a .htaccess file. Leachers will just get a “X” instead of an image. RewriteEngine OnRewriteCond %{HTTP_REFERER} !^http://www.yoursite.com [NC] RewriteCond %{HTTP_REFERER} !^http://yoursite.com [NC] RewriteRule [^/]+.(gif|jpg)$ – [F] Note: The first line is [...]

Extended atributes on linux filesystem

What are ext2 attributes? The Linux ext2 filesystem has supported extra flags or ‘attributes’ for files and directories in all Linux kernels since the 1.1 development series. The ext2 filesystem driver in the 2.2 and 2.4 kernel series permits setting and querying the following attributes: