December 30, 2008
SMART disk drives internally monitor the disks own health and performance. In many cases, the disk itself provides advance warning that something is wrong or if they are showing incorrect information. Please see:
http://smartmontools.sourceforge.net
for download and installation instruction and additional documentation can be found in the man pages (man smartctl and man smartd) and on the Web page.
Next I will present some commands can be used for checking drives using smart:
smartctl -i /dev/hda
This lists model/firmware information about the disk and please use this command as root and the correct path to your hard drives .
smartctl -Hc /dev/hda
This shows the results of the health status inquiry. If your disk health status is FAILING please contact your dedicated hosting provider as soon as possible.
smartctl -A /dev/hda
This lists the disk’s table.Normally are listed a part of attributes
smartctl -l error /dev/hda
This list a log of the disk errors
smartctl -l selftest /dev/hda
This is a report of the self-tests run on the disk. There are 2 types of tests long and short.
You can control and fine-tune the behavior of smartd using the configuration file /etc/smartd.conf.
December 24, 2008
How can you use APF to ban a IP address or domain?
You can use “apf -d ip.address” command to block bruteforcing ip addresses in APF permanently. I would also recommend looking at the following anti-bruteforcing solution called BFD that integrates into APF and will be blocking malicious IPs on itself:
http://rfxnetworks.com/bfd.php
As for the address of complains, it is usually the abuse address that is taken from the whois query on the IP behaving maliciously.
Finally, basic APF information is contained in the README file that comes in APF archive. It is also available online as http://rfxnetworks.com/appdocs/README.apf
December 23, 2008
This is a quick how-to prevent or even counteract to a DoS Attack on your Linux Box. First of all you can get the IP of the person by:
/bin/netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1
| sort | uniq -c | sort -n
This shall display a list of IP Addresses with the number of connections made to the BOX. Take the IP address of the one with lots of connections to the BOX and do the following to it:
iptables -I INPUT 1 -s IP_Address -j DROP
Here we BLOCKED all of his connections to the BOX regardless of protocol type (tcp, udp, icmp).
There is another way which is to play with the attacker and fool him is to use the NULL Route just do the following:
route add IP_Address gw 127.0.0.1 lo
Also, you can go for a bandwidth shaping solution or lets say Bandwidth control like this:
iptables -A INPUT -p tcp --syn -m limit --limit 1/s --limit-burst 8 -j ACCEPT
All these ways make DoS attacks harder to be done on you Linux BOX but they shall not prevent all types of DoS Attacks.
December 22, 2008
One recent request I have seen around the Web is, how do you install JRE on a dedicated server? Well if you are using Cent OS as your dedicated server operating system of choice, I have found a great guide to help you get going.
Thus I would like to give a short update to the blog post, since some things have changed since then. Also CentOS has been updated to Version 5.2 in the meantime.
The way I have done it with modifying the symbolic link in “/usr/bin/java/” still works, but it is not the recommended way to do it. Thus I follow here the path that the CentOS project has outlined. Where applicable I updated the link information. So, without further ado, let’s install JRE 6 or update it to the latest Version (update 6 for 6) as of today (06/26/2008).
Check out the rest of this great tutorial here:
http://blog.sixsigns.com/2008/06/26/update-on-installing-jre-6-on-centos/
December 17, 2008
Want to see what WHM (Web Host Manager) and cPanel look like before you buy you next dedicated hosting account? You can check out the demos for both on cPanel’s own web site:
http://www.cpanel.net/products/cpwhm/try_cp_whm.htm
Just plug the correct user name and login into the right demo, and you are all set. This is perfect for those out there who have never used eitehr – and want to see what they look like and feel like before they sink the money into them.
Also, it is worth taking note that not all cPanel themes (or WHM themes) will be alike. So you should ask your dedicated hosting provider that you have or you would like to have if their cPanel and WHM look like the ones on cPanel’s official web site.
December 15, 2008
Want to see a demostration of how great a control panel Plesk really is? Look no further, than the official web site:
http://www.parallels.com/products/plesk/demo/
Plesk is one of the most user-friendly control panels out there in the market that really caters to all users. With the Plesk control panel you can jump in, administrate your dedicated server and then jump right back out with ease. Parallels Plesk Panel is the leading hosting automation control panel on the market and the best option to bundle with your servers.
Powering more than 200,000 servers, 6 million domains and 10 million mailboxes worldwide, use the Parallels Plesk Panel to create service offerings that will improve your bottom line.
December 12, 2008
Need help accessing phpmyadmin from Plesk? Look no further, I have the perfect way to get that done from any dedicated hosting setup. In order to access phpmyadmin if you are using Plesk you must follow the steps listed bellow:
You must first login to your control panel via:
https://www.yourdomain.com:8443/
and enter your username and password.
You must have already created a database: See our article “How to create a mysql database”
Once the database is created:
- Click on the “Database” icon in Plesk
- Choose your database you want to manage
- Click on the “DB WebAdmin” icon
A popup window will open for phpmyadmin (make sure you do not have a popup blocker installed to prevent this).
You can now edit tables, fields and data as well as perform backups of your mysql database from within phpmyadmin.
and if you are using cpanel then you must follow the steps listed bellow:
- To access the MySQL Account Maintenance Menu, click on the icon above the words MySQL Databases on the main screen of your cPanel interface.
- Click on phpMyAdmin
Now you are in and ready to manage phpmyadmin from within your dedicated hosting account.
December 9, 2008
This is a continuation of our article from yesterday, Dedicated Hosting Vi Introduction (Part 1). Enjoy!
vi filename: edit filename starting at line 1
vi +nfilename: edit filename starting at line number n
vi +filename: edit filename starting at the last line
vi -rfilename: recover filename after a system crash
Moving the Cursor
space key, l, right-arrow key: one space to the right
h, left-arrow key: one space to the left
w: one word to the right
W: one blank-delimited word to the right
b: one word to the left
B: one blank-delimited word to the right
O: beginning of line
j , down-arrow: down one line
k, up arrow: up one line
): end of sentence
(: beginning of sentence
}: end of paragraph
{: beginning of paragraph
Control-F: forward one screen
Control-B: backward one screen
nG: to line n
G: to last line
Read on…
December 8, 2008
In the beginning, UNIX had only one editor, the line editor “ed.” UNIX still has ed, but few people use it. Line-by-line editors really are adequate only for making short, quick corrections to files or programs. A medieval version of UNIX contained a new program called “ex.” The most notable new feature of ex was a display editing facility which allowed a user to work with a full screen of text by giving the command vi . The new display editor proved so popular that AT&T UNIX System V included “vi” as a separate program. Vi is included in most operating systems.
This handout explains the basics of vi: creating files, moving the cursor and entering and editing text. After you have read it and practiced for a short time at your console, you should be able to do basic editing with vi. If you wish to use some of vi’s more complicated resources, we recommend a close study of the man pages.
Read on…