Archives for: January 2009

01/26/09

Permalink 05:22:56 am, by admin Email , 103 words   English (US)
Categories: General

Forcing ARP table flush

I just ran across this method for remotely forcing a gateway to flush an
arp entry when you move IP addresses around.

1) Download/install "arping" from the following URL. System will need
libnet-devel and libpcap:
http://www.habets.pp.se/synscan/programs.php?prog=arping

2) Run this command: arping -c 1 -S a.a.a.a b.b.b.b

Where "a.a.a.a" is the IP you've moved, and "b.b.b.b" is the gateway IP.
Run this from the server to which you moved the IP. This should force
the gateway to flush its arp entry for that source IP.

Permalink 05:20:19 am, by admin Email , 84 words   English (US)
Categories: General

Plesk Horde Vulnerablity Fix

Below is the quick fix for the Plesk-Horde vulnerability.

Manually apply a patch to the Horde Permission's User Interface code to
"remove" the "All Authenticated Users" option from the HTML form:

A quick fix to hide this setting in the UI code is to add HTML comments
("<! --" ... "-->") around the "All Authenticated Users" options in the
HTML form. Basically, it is to add "<! --" at line 63 and "-->" at
(original) line 81 in /usr/share/psa-horde/templates/shares/edit.inc

01/14/09

Permalink 08:37:30 am, by admin Email , 25 words   English (US)
Categories: Apache

Convert SSL cert from PK12 to PEM

Here's the openssl command to convert an SSL cert/key from PK12 (windows) to PEM format:

openssl pkcs12 -in cert.pfx -out cert.pem -nodes

01/09/09

Permalink 07:45:30 am, by admin Email , 157 words   English (US)
Categories: Apache

Apache MaxClients

Determine the "max process size":

ps -ylChttpd --sort=rss |less

will give output like:

S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 48 21481 20626 0 75 0 9028 75762 semtim ? 00:00:01 httpd
S 48 21487 20626 0 75 0 9040 75762 semtim ? 00:00:01 httpd
S 48 21482 20626 0 75 0 9064 75762 semtim ? 00:00:01 httpd
S 48 21486 20626 0 75 0 9088 75762 semtim ? 00:00:01 httpd
S 48 21485 20626 0 75 0 9096 75762 semtim ? 00:00:00 httpd
S 48 21488 20626 0 75 0 9104 75762 semtim ? 00:00:01 httpd
S 48 21017 20626 0 75 0 9116 75762 semtim ? 00:00:02 httpd
S 48 21019 20626 0 75 0 9168 75762 semtim ? 00:00:01 httpd
S 48 20645 20626 0 75 0 9188 75762 semtim ? 00:00:03 httpd
S 48 20703 20626 0 75 0 9304 75795 semtim ? 00:00:02 httpd
S 48 20628 20626 0 75 0 9324 75795 semtim ? 00:00:02 httpd
S 48 20629 20626 0 75 0 9376 75829 - ? 00:00:02 httpd
S 48 20630 20626 0 75 0 9408 75829 semtim ? 00:00:01 httpd
S 48 20633 20626 0 75 0 9412 75829 semtim ? 00:00:02 httpd
S 48 20634 20626 0 75 0 9432 75829 - ? 00:00:02 httpd
S 48 20631 20626 0 75 0 9448 75829 semtim ? 00:00:01 httpd
S 48 20632 20626 0 75 0 9692 75800 semtim ? 00:00:02 httpd
S 48 20704 20626 0 75 0 9788 75795 semtim ? 00:00:02 httpd
S 48 20635 20626 0 75 0 10016 75964 semtim ? 00:00:02 httpd
S 48 20705 20626 0 75 0 10040 75964 semtim ? 00:00:03 httpd
S 0 20626 1 0 78 0 14768 75729 - ? 00:00:00 httpd

Use the largest value in the RSS column. In this case 14768. The number is in KB of memory.

Determine MaxClients by dividing the available memory by the max process size. Keep in mind that MySQL and other applications may need some memory.

Here's a one liner to get max per process usage:

ps -ylChttpd --sort=rss | cut -f 16 -d " " | grep -v RSS | sort -n -r | head -1

January 2009
Sun Mon Tue Wed Thu Fri Sat
 << < Current> >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution free blog software