buy iwork 09 cheap buy acrobat for mac adobe audition price buy powerpoint 2003 online buy photoshop cs5 serial buy reason mac best price autocad 2011 order quarkxpress best price photoshop elements buy coreldraw graphics suite x4 education edition windows xp pro best buy microsoft word 2013 student discount best buy norton ghost 15.0 dreamweaver cs5 buy download windows 7 oem online

Why every business needs a Website

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 13-07-2012-05-2008

1

In the last decade, as the internet is growing and so does the access to all the information that is stored on it a business with no website is left without a representation dropping a good opportunity to be caught online via social websites or search engine results hence you will mess some potential customers.
It can rely on other websites to mention it, but eventually that is not the same as having its own website.

These days, for just a few bucks, with very little time and effort, any business can have a professional looking website that will help boost its services. Many benefits will be provided by the website to the business and its customers. Here are a few of them:

24/7 website availability – customers and potential customers can access your website whenever they want.
Access – The business will appear in search results which can bring it new customers
Business visibility – It’s very easy to the customers to learn about your business and what you are offering.
Easy to publish updates – Customers will be able to view what’s new on your business and hear about deals from your site.
It can save you money – A business website will allow you to save money on product advertisements, brochures and more. You can advertise your products and provide information related to your business in your website without any additional cost.

There are many more benefits from a business website, and the best thing about it is that it’s very easy to do and everyone can build their own website without spending too much money.

VN:F [1.9.20_1166]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)

Howto virus scan FTP uploaded files on PureFTPd using clamAV (cpanel servers)

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 18-07-2010-05-2008

1

Sorry for being away from the blog for this long period but things were overcrowded here with all this new sign ups and upgrades we were doing so we were on a tight time schedule but anyhow I got some free time to write back here to all the followers of our blog .

This Howto will help you virus can all uploaded via FTP to make sure all files are virus free:

First lets install clamAV , it has been now been included in Cpanel/WHM you can do so from your WHM interface as root by clicking on : Cpanel —> Manage Plugins —> on clamavconnector
Check the “Install and Keep Updated” and then click at the bottom of the page save.

After install finishes edit the file /etc/pure-ftpd.conf and change this line to look like this :

CallUploadScript yes

Next create file /etc/pure-ftpd/clamav_check.sh with this content :

#!/bin/bash
#Maximum file size to scan in bytes that's set to 10MB
MAXSIZE=10485760  
if [ "$UPLOAD_SIZE" -le "$MAXSIZE" ]; then
    /usr/bin/clamdscan  --remove --quiet --no-summary "$1" 
fi

Change its permissions so its executable :

chmod 755 /etc/pure-ftpd/clamav_check.sh

Now we should start the pure-uploadscript daemon to call our script every time a file is uploaded

/usr/sbin/pure-uploadscript -B -r /etc/pure-ftpd/clamav_check.sh

And to let it start with your server/vps reboots just run this :

echo "/usr/sbin/pure-uploadscript -B -r  /etc/pure-ftpd/clamav_check.sh" >> /etc/rc.d/rc.local

Now restart pure-ftpd :

service pure-ftpd restart 

Now all your uploaded files which are less than 10MB in size will be scanned , adjust this size limit per your needs

VN:F [1.9.20_1166]
Rating: 8.1/10 (10 votes cast)
VN:F [1.9.20_1166]
Rating: +2 (from 2 votes)

Howto Upgrade From Ext3 To Ext4 Without Formatting The Hard Disk

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 02-11-2009-05-2008

0

Last year EXT4 was announced as stable release and it was merged in kernel 2.6.28 as part of the coder afterwards, it brings many great features am stating some here before getting on how to move an existing partition to ext4 without formatting

Large file system
The ext4 filesystem can support volumes with sizes up to 1 Exbibyte (1,152,921,504,606,846,976 bytes) and files with sizes up to 16 tebibytes (1,099,511,627,776 bytes).

Extents
Extents are introduced to replace the traditional block mapping scheme used by ext2/3 filesystems. An extent is a range of contiguous physical blocks, improving large file performance and reducing fragmentation. A single extent in ext4 can map up to 128MB of contiguous space with a 4KB block size. There can be 4 extents stored in the inode. When there are more than 4 extents to a file, the rest of the extents are indexed in an Htree.

Persistent pre-allocation
The ext4 filesystem allows for pre-allocation of on-disk space for a file. The current methodology for this on most file systems is to write the file full of 0s to reserve the space when the file is created. This method would no longer be required for ext4; instead, a new fallocate() system call was added to the Linux kernel for use by filesystems, including ext4 and XFS, that have this capability. The space allocated for files such as these would be guaranteed and would likely be contiguous. This has applications for media streaming and databases.

my favorite ;)
Journal checksumming
Ext4 uses checksums in the journal to improve reliability, since the journal is one of the most used files of the disk. This feature has a side benefit; it can safely avoid a disk I/O wait during the journaling process, improving performance slightly.

NOTE
Filesystem changes/hacks contains certain risk ,though we tested this on our system we don’t guarantee this will work perfectly on your systems and we shall not be responsible for any data loss or hard disk crash .
p.s. backup your system before proceeding .

Step 1 :
Assuming we are changing sda2 edit its line in /etc/fstab to look like this

/dev/sda2     /                ext4    defaults      1  1

Step 2 :
Make sure needed packages are up-to-date then update your initrd image

yum upgrade mkinitrd e2fsprogs
mv /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img.old
mkinitrd -v --with=ext4 /boot/initrd-`uname -r`.img `uname -r`

Step 3 :
Boot using your OS CD-ROM into rescue mode and run this commands to apply the new FS extensions , make sure you’re working on the correct partition and you’re using

/mnt/sysimage/sbin/tune2fs -I 256 -O has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize /dev/sda2

The last command should tell your to run fsck and reboot if it didn’t it has failed , and you should remove the tune2fs option it asks to be removed

Last step :

fsck -pf /dev/sda2
VN:F [1.9.20_1166]
Rating: 5.4/10 (390 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 79 votes)

Howto protect services like SSH against brute force using only IPtables (port knocking)

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 12-08-2009-05-2008

1

Port Knocking is an approach that helps protecting your services ports from attacks the most famous brute forced would be SSH , the port knocking method depends that the client trying to connect will first attempt to connect to a predefined ports which will enable connection to your secured service port for 5 seconds , here is a simple script to set this kind of protection

#!/bin/sh 
# 
# Netfilter/IPtables - example of multiple-port knocking 
# Note: Knock ports 3456,2345,1234 to open SSH and MySQL ports for 5 seconds. 
# Nice thing to knock TCP with is `nc' program: 
# $> nc -w 1 <ip> 3456 ; nc -w 1 <ip> 2345 ; nc -w 1 <ip> 1234 ,ssh <ip>
# 
# Change this to the name of the interface that provides your "uplink" 
# (connection to the Internet) or connection you want to protect. 
UPLINK="eth0" 
# 
# Comma seperated list of ports to protect with no spaces. 
SERVICES="22,3306" 
# 
# Location of iptables command 
IPTABLES='/sbin/iptables' 
# 
${IPTABLES} -N stage1
${IPTABLES} -A stage1 -m recent --remove --name knock
${IPTABLES} -A stage1 -p tcp --dport 3456 -m recent --set --name knock2

${IPTABLES} -N stage2
${IPTABLES} -A stage2 -m recent --remove --name knock2
${IPTABLES} -A stage2 -p tcp --dport 2345 -m recent --set --name heaven


${IPTABLES} -N door
${IPTABLES} -A door -m recent --rcheck --seconds 5 --name knock2 -j stage2
${IPTABLES} -A door -m recent --rcheck --seconds 5 --name knock -j stage1
${IPTABLES} -A door -p tcp --dport 1234 -m recent --set --name knock

${IPTABLES} -A INPUT -m --state ESTABLISHED,RELATED -j ACCEPT
${IPTABLES} -A INPUT -p tcp --match multiport --dport ${SERVICES}  -i ${UPLINK} -m recent --rcheck --seconds 5 --name heaven -j ACCEPT
${IPTABLES} -A INPUT -p tcp --syn -j door

Some known pitfalls of port knocking are :

1- using consecutive port numbers like 100,200,300 which would cause the secured service port to be opened while using a port scanner like Nmap.

2- port knocking is not effective against replay attacks

3- using port knocking as your sole line of defense, it has to be one of many .

Some other famous scripts used for port knocking are fwknop and knockd

VN:F [1.9.20_1166]
Rating: 5.5/10 (407 votes cast)
VN:F [1.9.20_1166]
Rating: +7 (from 87 votes)

Howto fix WordPress < = 2.8.3 Remote admin reset password

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 12-08-2009-05-2008

0

A new exploit has been discovered in WordPress the famous blogging web application , the exploit resets the admin password without the need of the “Password Reset” email the detailed explanation is here , here is the exploited code :

function reset_password($key) {
    global $wpdb;

    $key = preg_replace('/[^a-z0-9]/i', '', $key);

    if ( empty( $key ) )
        return new WP_Error('invalid_key', __('Invalid key'));

    $user = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->users WHERE user_activation_key = %s", $key));
    if ( empty( $user ) )
        return new WP_Error('invalid_key', __('Invalid key'));

Since the key is only checked for being an empty string then if you pass an empty array (which is a different type of variables) we will bypass this step and the password will be reset right away and sent to the admin listed e-mail .

In order to fix this problem edit wp-login.php with your favorite editor and change this lines :

Line 190 in WordPress 2.8.3 or line 169 in earlier 2.8 versions

if ( empty( $key ) )

TO

if ( empty( $key ) || is_array( $key ) )

This will add a check to invalidate passing an array to the $key variable .

Enjoy!

VN:F [1.9.20_1166]
Rating: 5.5/10 (386 votes cast)
VN:F [1.9.20_1166]
Rating: -8 (from 84 votes)

Various Sys Admin one line Bash commands, one-liners (CLI wisdom)

Posted by HostsVault | Posted in Tips-And-Tricks, Tutorials | Posted on 26-07-2009-05-2008

2

This are a set of commands that a sys admin could use to perform various tasks on a server , varying from listing server Ips to optimizing MySQL tables , hope it helps you managing different tasks fast :

!!:gs/foo/bar

Runs previous command replacing foo by bar every time that foo appears
Very useful for rerunning a long command changing some arguments globally.

ping -i 60 -a IP

Set audible alarm when an IP address comes online
Waiting for your server to finish rebooting? Issue the command above and you will hear a beep when it comes online. The -i 60 flag tells ping to wait for 60 seconds between ping, putting less strain on your system. Vary it according to your need. The -a flag tells ping to include an audible bell in the output when a package is received (that is, when your server comes online).

du -b --max-depth 1 | sort -nr | perl -pe 's{([0-9]+)}{sprintf "%.1f%s", $1>=2**30? ($1/2**30, "G"): $1>=2**20? ($1/2**20, "M"): $1>=2**10? ($1/2**10, "K"): ($1, "")}e'

Sort the size usage of current directory tree by gigabytes, kilobytes, megabytes, then bytes.

tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16;echo

useful for generating passwords,
Find random strings within /dev/urandom. Using tr to use only Alphanumeric characters, and then print the first 16.

mkdir -p a/long/directory/path

This will create the intermediate directories that do not exist.

ctrl-t

Switch 2 characters on a command line.
If you typed ‘sl’, put the cursor on the ‘l’ and hit ctrl-t to get ‘ls’.

grep -i --color=auto

Highlights the search pattern in red.

!!

Repeat last executed command

DD=`cat /etc/my.cnf | sed "s/#.*//g;" | grep datadir | tr '=' ' ' | gawk '{print $2;}'` && ( cd $DD ; find . -mindepth 2 | grep -v db\.opt | sed 's/\.\///g; s/\....$//g; s/\//./;' | sort | uniq | tr '/' '.' | gawk '{print "CHECK TABLE","`"$1"`",";";}' )

Generate CHECK TABLE statements for all MySQL database tables on a server

export dbname=DB;for i in `mysql --batch --column-names=false -e "show tables" $dbname`;do  mysql -e "ALTER TABLE $i DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci" $dbname;done

Change all tables inside a database to UTF8 character set.

ifconfig | grep "inet [[:alpha:]]\+" | cut -d: -f2 | cut -d' ' -f1

Get the IP address of all your network cards.

VN:F [1.9.20_1166]
Rating: 5.3/10 (407 votes cast)
VN:F [1.9.20_1166]
Rating: -10 (from 86 votes)

Howto Free up used memory on a Linux operating system

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 29-06-2009-05-2008

3

Usually the kernel handles memory utilization pretty well it caches memory for dentry cache, page cache and inodes which improves IO speed and performance generally. But in some cases user applications needs lots of memory and we need to clear what’s called dirty memory which could be inodes already written to the disk, so now the kernel given us the option to manage this manually.

First of all Run sync command to flush all file system buffers

Then run one of this commands :

echo 1 > /proc/sys/vm/drop_caches

This will free only page caches

echo 2 > /proc/sys/vm/drop_caches

This will free inodes and dentry caches

echo 3 > /proc/sys/vm/drop_caches

This will free ALL

VN:F [1.9.20_1166]
Rating: 5.7/10 (414 votes cast)
VN:F [1.9.20_1166]
Rating: +13 (from 99 votes)

Howto recompile Linux kernel faster (reduce compilation time)

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 29-06-2009-05-2008

5

Normally when you build a custom kernel you use some config files available online which have everything enabled to assure everything works, but this elongates compilation time which also could make your kernel bigger than needed, finally Steven Rostedt has come up with a awesome solution for this problem .

He developed a perl script “”streamline_config” that you can download here it will make a custom config file that will still boot your box, but bring down the compile time of the kernel can be really long.

The script will perform “lsmod” to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module “=m” that is not needed to enable the currently loaded modules. The output goes to standard out.

Here is Steven’s thread about the script

Steps to run the script :

1- Boot up the kernel that you want to streamline the config on.
2- Change directory to the directory holding the source of the kernel that you just booted.
Then run this commands :

./streamline_config.pl arch/x86/Kconfig > new_config
mv .config config_old
mv new_config .config
make oldconfig

if you wanna modify anything you can run make menuconfig instead of make oldconfig

VN:F [1.9.20_1166]
Rating: 5.6/10 (356 votes cast)
VN:F [1.9.20_1166]
Rating: -3 (from 67 votes)

Howto recover deleted files (undelete) on a Linux ext3 partition

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 23-06-2009-05-2008

4

I know this has been considered impossible for quiet a long time but its now possible – actually for quiet awhile now- thanks to foremost software, it can recover files based on their headers, footers, and internal data structures. This process is known as data carving.

Foremost can work on image files, such as those generated by dd, Safeback, Encase, etc, or directly on a drive. The headers and footers can be specified by a configuration file or you can use command line switches to specify built-in file types. These built-in types look at the data structures of a given file format allowing for a more reliable and faster recovery.

Foremost can recover files with the following extensions:
jpg – Support for the JFIF and Exif formats including implementations used in modern digital cameras.
gif
png
bmp – Support for windows bmp format.
avi
exe – Support for Windows PE binaries, will extract DLL and EXE files along with their compile times.
mpg – Support for most MPEG files (must begin with 0x000001BA)
wav
riff – This will extract AVI and RIFF since they use the same file format (RIFF). note faster than running each separately.
wmv – Note may also extract -wma files as they have similar format.
mov
pdf
ole – This will grab any file using the OLE file structure. This includes PowerPoint, Word, Excel, Access, and StarWriter
doc – Note it is more efficient to run OLE as you get more bang for your buck. If you wish to ignore all other ole files then use this.
zip – Note is will extract .jar files as well because they use a similar format. Open Office docs are just zipped XML files so they are extracted as well. These include SXW, SXC, SXI, and SX? for undetermined OpenOffice files.
rar
htm
cpp – C source code detection, note this is primitive and may generate documents other than C code.
You can tweak /etc/foremost.conf to add support for more file types.

Please note that there’s no guarantee that foremost will succeed in recovering your files, but at least there’s a chance.

On Debian and Ubuntu, foremost can be installed simply by issuing this command :

apt-get install foremost

or download and extract the source from the tar.gz and run this inside the extracted dir :

make;make install

So easy , now you’re ready to start using foremost here are some example usage:

foremost -t jpeg -i /dev/sda1

in this example we are looking for all deleted jpg files on /dev/sda1 , foremost always output the results in directory called output, its created in the directory where you ran foremost so be sure to run it from a directory not located in /dev/sda1 to avoid overwriting one of your deleted files ;)

Inside the output directory you will find a file named audit.txt which the log of this restoration process and also a directory named jpg cuz we were searching for jpegs in our last example

foremost -t pdf -T -i /dev/sda1

In this example we are searching for pdf files and appending results to the output directory (because foremost will not start if there’s already an output directory)

foremost -s 100 -t jpg -i image.dd

Here we are searching for jpeg files skipping the first 100 blocks inside this dd image

foremost -t all -i /dev/sda1

Searching for all predefined types

VN:F [1.9.20_1166]
Rating: 5.5/10 (414 votes cast)
VN:F [1.9.20_1166]
Rating: +6 (from 82 votes)

Howto piss off your sysadmin

Posted by HostsVault | Posted in Tips-And-Tricks | Posted on 14-06-2009-05-2008

0

We do appreciate and respect all our customers, this post is just for the sake of laughing :)

 

Lie. Seriously, people will do this, even when you can easily prove it, and when they know that you can. I have a lot more respect for someone that will say I screwed things up than for someone who pretends he has done nothing wrong at all.

Rant. Seriously, I don’t give a heck how many other people you’ve talked to who don’t have this problem, how much am paying for the service, or what kind of problems you’ve had in the past. That does NOTHING WHATSOEVER to help me solve your immediate problem.

Do things to your computer, while they’re on the phone with you, that they didn’t tell you to. They’re usually going through a mental checklist of things that could be wrong. If you could’ve done this by yourself, then why did you call in the first place?!

Ask them very open-ended questions.

Call and ask ‘Is the server down?’ They love that.

When something doesn’t work, randomly change configuration options until it does.

Claim to be knowledgable due to some bloated certification. Claim that you could fix the problem faster.

Use Windows ICS. Call your webhosting provider about problems that are obviously related to your internal network configuration. Tell them they should help you.

Email support and complain that you can’t send mail.

Get annoyed and huffy when they assume you’re a moron.

Relate to them how your company would handle a problem of this nature with one of it’s clients.

Tell them exactly how your day is going Include amusing anecdotes.

Be as nonspecific as possible.

VN:F [1.9.20_1166]
Rating: 5.6/10 (358 votes cast)
VN:F [1.9.20_1166]
Rating: -5 (from 87 votes)