Determine if the storage is SSD or HDD – using linux command

You’ve purchased a Cloud server or a Virtual server. The server provider says it comes with an SSD (Solid State Drive). Now you definitely would like to verify whether the storage is indeed SSD or is it simple HDD (Hard Disk Drive). If you’re server is running on any version of Linux OS (kernel version 2.6.29 onwards) – just run the following command:

cat /sys/block/sda/queue/rotational

Linux command to identify if a storage is ssd or hdd

The result will be Either 1 or 0 . If it is “0” – Congratulations – your storage is indeed an SSD one and if the result is “1” – your storage device is an HDD.

I ran the above command in one of my VPSs. The result is “1” – that is the storage device used here is an HDD.

Disable / enable WordPress comments from phpMyAdmin

WordPress comments option is often not needed for our website. It is also true that we often forget to disable the commenting option. As a result – spammers fillup your website with garbage/spam comments to create backlinks of their website. You can always disable the commenting option from the wordpress admin dashboard. But assume you are a web hosting provider and you found one of your client’s WordPress site is quickly filling up with spam comments. You may not have wordpress admin password of your client’s website. In this case you can quickly disable comment option by using a small query in phpMyAdmin panel.

You need to follow the following steps:

1. Go to the phpMyAdmin panel from your hosting control panel.

2. Locate the wordpress database in the drop down list in the left panel and click on it.

3. Now click on the “SQL” tab in the navigation panel in the right page.

4. Within the “Run SQL Query” box, paste the following code:

UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’;

(Replace “wp_post” with the appropriate prefix of the wordpress table)
If successful, you should have disabled the ability to comment on your posts across your entire blog. To re-enable the commenting run the following SQL query the same way you ran the comment disable query:

UPDATE wp_posts p SET comment_status = ‘open’, ping_status = ‘open’ WHERE comment_status = ‘closed’;

(Replace “wp_post” with the appropriate prefix of the wordpress table)

Delete all pending spam / comments of WordPress from phpMyAdmin

We do not really need wordpress comments option for websites most of the times. After developing a website in WordPress we often forget to disable comments. And that is what attracts the spammers. Spammers fill out comments option with bots and tries to create backlinks from your website. These garbage comments also increases the database size and creates pressure on the server. The comments option in WordPress doesn’t allow us to delete more than 20 comments at a time. If your website has been bombed with spams – it may have thousands of them before you realize those are there. So it becomes a hectic job deleting 20 such comments from the WordPress dashboard.

In such circumstances – you may delete all of those spam comments from the phpMyAdmin panel or using MySQL queries in database tools. Here is how you may delete such spam comments from the phpMyAdmin:

1. Go to the phpMyAdmin panel (Most of the hosting platforms offer it).

2. Click on the database in the left panel (you may have other databases there)

3. Click on the “wp_comments” table in the left panel or in the main page in right. (Assuming database table prefix is “wp”. replace “wp” to whatever else you have set as database prefix).

4. Now in the right side page – click on the “SQL” tab at the top.

5. Now run the following query:

DELETE FROM wp_comments WHERE comment_approved = 0

(replace “wp” with the table prefix you have in your wordpress database)

The above query will delete any comment which you haven’t approved.

10 best Joomla template makers – pricing details, free template links

 GavickPro

Top joomla club template maker - GavickProGavickPro is a Poland based template maker. Their templates are clean and look very smart. They are in the industry for a long time now (Since 2008). They have  variety of category based on which they design their templates. They design the same template (theme) for wordpress too. Templates are designed based on the Gavern framework – which includes Layout changes, Color Schemes, Advanced typography, Social Media Buttons, Google and Squirrel Fonts. They have some of their own Joomla extensions that they’ve used in their templates.

Single Template/Theme Price: 39€
Club Membership – All Theme Package: 99€ (One time payment unlimited validity)
Support: 99€ additional (for 2 months)

Free Templates: https://www.gavick.com/joomla-templates/tag,free-Joomla


 2. IceTheme

Top joomla club template maker - IceThemeIceTheme is a Albania based template maker. Their templates are clean and all of those look lively too. The company was founded back in 2008 and they already have come up with a huge number of templates to cover various categories. They use LESS CSS and Bootstrap framework  ready fully responsive design in their templates.

Membership Plans:

Personal: $45 (1 Month Support, All themes)
Standard: $75 (4 Months Support, All themes)
Developer : $120 (1 Year Support, All themes, PSDs)

Free Templates: http://www.icetheme.com/themes/free


3. JoomlaXTC

Top joomla club template maker - JoomlaXTCJoomlaXTC is well-known for its unique design and great support. I have gone through some review websites and found that all their clients are very happy with their support. Now this may not seem to you a very attractive feature when choosing a Template provider – but it indeed is a very important thing to consider. Because, if you start working with a Joomla template – you may face problems at various stages and that’s when the support thing can get handy. The templates are a bit different from others and are uniquely matte looking but gorgeous.

Membership Plans:

One Year Membership: $99 (5 Domains Allowed, All templates)
Life Time Membership: $199 (Unlimited domains, All templates)
Free Templates: http://www.joomlaxtc.com/resources/free-templates


4. JoomlArt

Top joomla club template maker - JoomlArtJoomlaArt is powered by their powerful T3 framework. The framework allows the users to create unique template within a very short time. You can create various module positions, resize them according to your needs. It is the second best framework I have seen while working with Joomla. The bold use of different colors make their template really eye-catchy. Besides Joomla they design Magento Themes. They have developed a lot of their own extensions (Modules, plugins and components).

 

Membership Plans:

JATC Standard 3 Months Membership: $59 (Access to Joomla resources + Premium Support)
JATC Standard 1 Year Membership: $70 (Access to Joomla resources + Premium Support)
JA Developer Membership: $300 (1 Year, Access to Joomla + Magento all resources, VIP Support, Copyright Removal)

Free Templates: https://www.joomlart.com/joomla/templates/tag/free


5. RocketTheme

Top joomla club template maker - RocketThemeRocketTheme is powered by their framework “Gantry”. Gantry is a powerful and flexible framework for creating templates. The Layout Manager allows the users to create a layout with drag-and-drop option. The use of dark color in RocketTheme templates are noticeable. Besides Joomla – RocketTheme produces templates/Themes for Magento, WordPress and phpBB.

 

Membership Plans:

Basic: $44 (3 Months Membership, 1 Site License)
Standard: $59 (6 Months Membership, 2 Site License)
Plus: $74 (12 Months Membership, 3 Site License)
Developer: $262 (12 Months Membership, UNLIMITED Site License)

Free Templates:

http://www.rockettheme.com/joomla/templates/afterburner2

http://www.rockettheme.com/joomla/templates/grunge

http://www.rockettheme.com/joomla/templates/quasar


6. Shape5

Top joomla club template maker - Shape5Shape5 is a popular template maker. They build their templates with the help of their Vertex framework. Their templates are clean and they use images to decorate their templates very well. Besides Joomla they design WordPress themes too.

Club Membership Plans: (Joomla + WordPress altogether)

Basic: $59 (3 Months Membership, 1 Domain)
Extended: $69 (3 Months Membership, 2 Domains)
Best Value: $79 (3 Months Membership, 4 Domains)
Developer: $299 (3 Months Membership, unlimited Domains, use in client sites)

Free Templates:  http://www.shape5.com/product_details/free_templates/
Free Extensions: http://www.shape5.com/product_details/free_extensions/


7. JoomlaBamboo

Top joomla club template maker - JoomlaBambooJoomlaBamboo creates unique and clean templates. Their templates are indeed different than others. Their use of Zentools allows the template users to customize website look with Drag-and-drop layout builder.

Club Membership Plans:

3 Months: $45 (3 Months, 1 Domain)
12 Months: $85 (12 Months,  5 Domains)
6 Months Developer: $145 (6 Months, Unlimited Domains)
Developer: $225 (12 Months, Unlimited Domains)
Life Time Developer: $495 (Life time, Unlimited Domains)


8. YouJoomla

Top joomla club template maker - YouJoomlaWith their YJ Simple Grid (YJSG) – it is a complete power for the users to design their websites with easy customization options. They have 122+ templates in their pouch.

Club Membership Plans:

Gold: $58 (3 Months, Unlimited Domains)
Platinum: $98 (1 Year, Unlimited Domains)
Developer: $298 (1 year, Unlimited Domains, Copyright removal, Use on client Sites)

Free Templates: http://www.youjoomla.com/free-joomla-templates.html


9. OmegaTheme

Top joomla club template maker - OmegaThemeOmegaTheme has a huge collection of nicely designed Joomla templates. Like other template makers – OmegaTheme has their own framework named Jarvis. The layout builder as well as presets for every template gives the users the flexibility to utilize the template to design their website. They design templates for Magento and Prestashop too.

Club Membership Plan:

Single: $49 (3 months, Single domain)
Standard: $69 (12 Months, 3 domains)
Developer: $249 (12 Months, unlimited domains)

Free Templates: http://www.omegatheme.com/free-joomla-templates


10. JoomShaper

Top joomla club template maker - JoomShaperJoomShaper has taken Joomla to a next level. It makes designing Joomla website so easy that anyone can work with Joomla. Their framework “HELIX” is THE BEST framework I have seen so far. The layout manager and rich template manager options gives the user the power to design a rich website with ease. They have another unique feature which is the “Page Builder”. It gives the users to design each and every page independently and moreover with the flexibility of drag-and-drop layout builder. No doubt in my mind that JoomShaper is the Best template maker of all.

Club Membership Plans:

Personal: $59 (3 Months, Unlimited Domains)
Business: $99 (6 Months, Unlimited domains)
Developer: $299 (1 Year, Unlimited Domains, Page Builder Pro)

Free Templates: http://www.joomshaper.com/joomla-templates?tag=free

GHOST vulnerability in Linux distributions and its Solution

A GNU C Library (glibc) vulnerability – termed as “GHOST Vulnerability” was announced to general public on 27  January 2015 – after a Cloud research company Qualys discovered this major security vulnerability. This vulnerability enables hackers to remotely take control of systems without even knowing any system IDs or passwords.

Ghost Vulnerability - A serious security hole in Linux systems

How to Quickly Identify if your system is vulnerable:

The GHOST vulnerability can be exploited on Linux systems that use versions of the GNU C Library prior to glibc-2.18. That is, systems that use glibc-2.2 to glibc-2.17 are at risk. Many Linux distributions like CentOS (6,7), Debian 7, RHEL (6,7), Ubuntu and Distributions with end of life are vulnerable and should be patched immediately.

You may check the version of glibc by looking up the version of ldd (which uses glibc) with the following command:

#ldd –version

The first line of the output will tell you the glib version, the output could be like this:

# ldd (GNU libc) 2.12

As mentioned earlier – if it is older than 2.18 – your system is vulnerable.

How to solve (patch the system) this problem:

Ubuntu / Debian:

Update all of your packages to the latest version available using this command:

# sudo apt-get update && sudo apt-get dist-upgrade

Respond to the confirmation prompt with: “y” and finally reboot using this command: # sudo reboot

 

CentOS / RHEL:

Update glibc to the latest version available via “yum”:

# sudo yum update glibc

Respond to the confirmation prompt with: “y” and finally reboot using this command: # sudo reboot

 

IF UPDATE FAILS:

To mitigate the problem you before the patch change the value of UseDNS to “no” in “etc/ssh/sshd_config”. This disables the Reverse DNS checks in public facing services.

Although you can be relived for the time being – make sure you patch your distribution whenever it is available using the steps mentioned above.

Free Joomla.com Subdomain

GRAB YOUR JOOMLA SUBDOMAIN – BEFORE OTHERS TAKE IT AWAY.

Like wordpress – Joomla.com is now offering subdomain. You can open your joomla.com subdomain with just 1 step – signup process.

Free joomla subdomain

This is indeed a great initiative by joomla. It will help the beginners to learn Joomla on realtime hosted environment.

However, if you signup multiple subdomain – you may face an additional captcha verification step

Free joomla subdomain

I got mine: hasibul.joomla.com 🙂

Quota Problem in WHM: Enabling second level quota on an OpenVZ node

I am talking about a very common problem in cPanel/WHM based server or VPS. Fresh WHM based server often do not show proper quota allocation for the hosting accounts. It show ZERO usage and Unlimited quota. Fixing the problem in a dedicated server is quite straight forward. The “Initial Quota Setup” in WHM or the command ” /script/fixquota” will solve the problem. But VPSs requires a second level quota setup as the first level quota is configured during VPS container setup.

Solution is to enable second level quota on the node. To do it execute these commands on the node:

vzctl stop CTID
vzctl set CTID –quotaugidlimit 100 –save
vzctl start CTID

Then, if you’re under WHM, do the “Initial quota setup” thing or run “/script/fixquota” through SSH.

NOTE:

CTID is the container/vps id number.

On the second command,  –quotaugidlimit 100 <- this is the number that defines the max file owners. Example: you have 100 users into the vps, set it to 120. You have 300 users into the vps, set it to something more than 300. I’ve used 100 on this example because it’s a common average value. Keep in mind that the more you set, the more kernel memory overhead will be created.

How to block IP address in Linux – Using IPTables Rule

Using IPTables rules we can block a Single IP address or a block of IP Addresses.

The following command (via ssh) will drop any packet coming from the IP address 1.2.3.4 :

# iptables -I INPUT -s 1.2.3.4 -j DROP

or you can use append

# iptables -A INPUT -s 1.2.3.4 -j DROP

How To Block Subnet (ip.Add.re.ss/subnet):

If your Machines public interface card name is eth1 and if you’d like to block the subnet 10.0.0.0/8 -Use the following syntax:

# iptables -i eth1 -A INPUT -s 10.0.0.0/8 -j DROP

How to View Blocked IP Address(es):

Simply use the following command:

# iptables -L -v

How to Save Blocked IP Address(es) in IPTables:

# service iptables save

ConfigServer installation IPtables problem in OpenVZ or Virtuozzo (solved!)

ConfigServer Firewall (AKA csf) is an essential security tool for Linux based server and VPS.

The installation of CSF is pretty straight forward and is described here: http://configserver.com/free/csf/install.txt

However, some of the iptables modules required by the csf might not be present in the server and when the perl test command ( # perl /usr/local/csf/bin/csftest.pl ) is run in the VPS container while installing csf – the following fatal error may be encountered:

[root@vps-xyz ~]# perl /etc/csf/csftest.pl
Testing ip_tables/iptable_filter…OK
Testing ipt_LOG…FAILED [ 4294967295] – Required for csf to function
Testing ipt_multiport/xt_multiport…FAILED [FATAL Error: iptables: Unknown error 4294967295] – Required for csf to function
Testing ipt_REJECT…OK
Testing ipt_state/xt_state…FAILED [FATAL Error: iptables: Unknown error 4294967295] – Required for csf to function
Testing ipt_limit/xt_limit…FAILED [FATAL Error: iptables: Unknown error 4294967295] – Required for csf to function
Testing ipt_recent…FAILED [Error: iptables: Unknown error 4294967295] – Required for PORTFLOOD and PORTKNOCKING features
Testing xt_connlimit…FAILED [Error: iptables: Unknown error 4294967295] – Required for CONNLIMIT feature
Testing ipt_owner/xt_owner…FAILED [Error: iptables: Unknown error 4294967295] – Required for SMTP_BLOCK and UID/GID blocking features
Testing iptable_nat/ipt_REDIRECT…FAILED [Error: iptables v1.3.5: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)] – Required for MESSENGER feature
Testing iptable_nat/ipt_DNAT…FAILED [Error: iptables v1.3.5: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)] – Required for csf.redirect feature

SOLUTION:

To resolve the issue – You’ll need to have access to your Hardware node (main server – not the VPS container). If you do not have access to the main server you may provide this guide to your VPS provider. Now you need to do the following steps:

1. First, you need to define required iptables modules are available for VPS.
Edit /etc/sysconfig/iptables-config file on the Hardware Node (Main server) and make sure you have the following:

IPTABLES_MODULES="ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp"

Edit /etc/sysconfig/vz file:

IPTABLES="ipt_REJECT
ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp"

2. Restart Virtuozzo/OpenVZ:

# service vz restart

3. execute the command (Assuming your VPS’s CTID is 1001):

# vzctl set 1001 --netfilter full --save --setmode restart

4. Now run the perl test command once again in the VPS container and you should see the result successful:

root@vps-xyz [~]# perl /usr/local/csf/bin/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server

5. Finally restart CSF:

# Service csf restart

 

 

How to disable IPtables Firewall in Linux (Red hat/CentOS/Fedora Core)

Disable / Turn off Linux Firewall (Red hat/CentOS/Fedora Core)

Type the following two commands to save the IPtables first and then to stop it (you must login as the root user):

# /etc/init.d/iptables save
# /etc/init.d/iptables stop

Turn off firewall on boot

# chkconfig iptables off

Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core)

Type the following command to turn on iptables firewall:

# /etc/init.d/iptables start

 

Turn on firewall on boot:

# chkconfig iptables on