8 Jan 2010

Linux Shtuff Posts

Author: admin | Filed under: General Info

Hi,

When I started this blog, I started it for my own benefit so I could remember those little tweaks or fixes which escape memory at crucial times when a needed repair or a new issue arose that I had never dealt with before. When I would research these issues, I would come across great posts and information I wanted to remember and posted that information here. I did not give credit where credit was due regarding those posts and if you find something that was posted by you, please let me know and I will credit the post to you. I cannot remember where I pulled all of the information from so, if you see something that is yours, do not fret, I am not stealing your shtuff, I am posting it so all can read and learn from the mistakes and information I have gathered. Most of the posts are mine, but not all. Thank you all for your patience and information you have shared to better improve the linux experience.

Oh and by the way, if you see a post that has outdated or incorrect information, please, please, pretty please let me know so I can update it. Believe it or not, I use this site also and I want my information to be up to date as well. Thanks again for visiting.

Comments Off
16 Feb 2012

Malware site scanner

Author: admin | Filed under: General Info

Hi,

I don’t usually recommend a lot of web based tools but I had to mention this one, sitecheck.sucuri.net. This quick little web based malware/site scanner just saved me about 2 weeks worth of work by locating a segment of .js that was causing a malware warning to be thrown only in certain browsers and anti-virus scanners.

Because the .js was new and buried about 9 layers deep in a wordpress plugin, it would have been nearlly impossible to locate by hand. This tool pulled it up in about 30 seconds. Well done sir web scanner…

sitecheck.sucuri.net

Comments Off
13 Feb 2012

CSF/LFD install guide for Plesk

Author: admin | Filed under: General Info

From diademblogs.com

Config Server Firewall (csf) and Login Failure Daemon (lfd) is a robust firewall solution having Stateful Packet Inspection (SPI), Login/Intrusion Detection and Security application for Linux servers. Although it is more compatible with CPanel we have been able to use the same for the Plesk hosting control panel also and it is running fine. Please visit the below link for more information.
From http://www.configserver.com

I have listed the installation steps for CSF / LFD.Login to your server with ‘root’ user and issue below commands :
Change directory to either /root or /usr/local/src , which ever you normally use for such installations

 cd /usr/local/src

[Remove any old source that might be present]

Download and untar the source for installation

 wget http://www.configserver.com/free/csf.tgz<br />
 tar -xzf csf.tgz

Run installation script

 cd csf<br />
 sh install.sh

Read the rest of this entry »

Comments Off
24 Jan 2012

clearing the arp cache in linux

Author: admin | Filed under: General Info

You can clear the arp cache using following commands

Current arp cache

root@server [~]# arp -n<br />
Address      HWtype  HWaddress           Flags Mask  Iface<br />
70.167.140.1 ether   00:00:0C:9F:F0:04   C           eth0<br />

Clearing arp cache with verbose

root@server [~]# ip -s -s neigh flush all<br />
70.167.140.1 dev eth0 lladdr 00:00:0c:9f:f0:04 ref 42 used 17/0/65 REACHABLE

*** Round 1, deleting 1 entries ***
70.167.140.1 dev eth0 ref 42 used 0/0/0 INCOMPLETE

*** Round 2, deleting 1 entries ***
*** Flush is complete after 2 rounds ***

current entries

root@server [~]# arp -n<br />
Address      HWtype  HWaddress           Flags Mask  Iface<br />
69.167.140.1 ether   00:00:0C:9F:F0:04   C           eth0<br />

You can also delete specific arp entries using the two following command

root@server [~]# arp -d 192.168.1.1<br />
root@server [~]# arp -d 192.168.1.2<br />

<br />
Add a static arp entry<br />
root@server [~]# arp -s 192.168.1.10 00:00:93:12:04:57

tested on CentOS release 5.7 (Final)

Comments Off
16 Jan 2012

Villustrator

Author: admin | Filed under: General Info

From bilalquadri.com

Here is a nice little addition to vi or vim. You can create a custom theme for vi/vim and download it to use locally. Nice!

From their FAQ:

Where do I put the colorscheme I just downloaded?
The colorscheme should be put in “~/.vim/colors”. If those directories don’t already exist, you will need to create them.

I’m using Vim in the terminal. How can I use my colorscheme outside of gvim?
There are few things to note here:
• Make sure you tell Vim how many colors your terminal supports. Just add this line to your .vimrc file in your home directory:
let &t_Co=256

Use 88 instead of 256 if that’s what your terminal supports.
• Download and unzip this plugin into the ~/.vim directory. After that, you should be set.

How do I change my colorscheme?
Just type “:colorscheme ” in Vim without the quotes. Tochange the default colorscheme, just add that line to your .vimrc file in your home directory.

From bilalquadri.com

Comments Off
10 Jan 2012

Reset visual and editor to use Vim

Author: admin | Filed under: General Info

Hi,

I ran across a small issue where the client wanted to use vim as the default editor for crontab as opposed to pico. I was able to modify this by using the following commands;

EDITOR=vim;
export EDITOR
VISUAL=vim;
export VISUAL=vim

and done…

Now, when editing crontab, it uses vim. Simple.