Plesk: How to Change Qmail IP Address

Re: Change plesk qmail IP address

If you’ve got a Plesk server and some unsavoury character has hosted and spammed from your server, even if you remove them you may find your IP is blocked by many of the blacklists – even though this will only be temporary for 24 or 48 hours, this is still an issue for your remaining clients.

What you need to do it temporarily change the qmail sender IP address, this is very easy to do and as I say, it’s temporary, a server reboot gets everything back to normal.

Let’s say your qmail IP address is 1.1.1.1 and you want to change it to 2.2.2.2. Your gateway is 3.3.3.3 and does not change.

SSH in to your server console and let’s look at your setup:

# /sbin/ip route
1.2.3.4/1 dev eth0 proto kernel scope link src 1.1.1.1
 1.2.3.4/16 dev eth0 scope link
 default via 3.3.3.3 dev eth0

To change the default qmail IP from 1.1.1.1 to 2.2.2.2:

# /sbin/ip route change default via 3.3.3.3 dev eth0 src 2.2.2.2

That’s all there is to it. All qmail outgoing mails now leave from IP 2.2.2.2 instead of 1.1.1.1

Send an email, look at the header, you will see the email came from the new IP address. If you screw up, at worst, simply reboot the server to get the IP settings as before. This works fine on all versions of Plesk that we have used.

How to change phpMyAdmin post_max_size to more than 2MB

Re: Unable to increase upload limit for phpMyAdmin in Plesk

To change the post_max_size in Plesk it is not as simple as changing the /etc/php.ini file entries as there are not active when running phpMyAdmin from within with Plesk Control Panel.

Usually, on a regular *nix installation you would look for these values in /etc/php.ini

  • upload_max_filesize
  • phpMyAdmin logo

What you need to change in fact is this file:

# vi  /usr/local/psa/admin/conf/php.ini

change:

  • upload_max_filesize = 2147483647
  • post_max_size = 2147483647

to:

  • upload_max_filesize = 32M
  • post_max_size = 32M

This value will now allow phpMyAdmin uploads of files up to 32M is size. Enter your own value here.

Which domain extensions should I register?

This is a tough question if you are registering your first domain and you are also on a tight budget.

  • As a minimum, you need to register the .co.uk if you are a UK based company and also the .com version if available.
  • If your site is important,  consider registering as many extensions as possible to prevent others pretending to be you.
  • While your business is new you can register the domains at cost. Once you are established, obtaining the domain names from a squatter is going to be expensive, if not impossible.
  • Find a comfortable budget for your domain registrations. Annually the costs is much less than it used to be.
  • You may need to consider registering misspellings if your brand name can easily be misspelt for additional protection.

The reason you need to register both the .co.uk and the .com becomes apparent once your site becomes successful. Do you really want someone to launch a site with your company brand and have them ride on your coat tails – or even bring your business in to disrepute? So, if you can, get both the .co.uk and the .com extensions.

So how about the rest of the extensions?

If you are serious about your business, you need to purchase as many extensions as your budget will afford. Domain registration is very cheap these days and there are no excuses for cutting corners. Once your business is successful it will be very difficult if not impossible to collect the extensions after they have been registered by other parties.

So I should register all of the extensions?

If you can, in this order, you should take the .co.uk, .com, .net, .biz, .info and .eu. As stated earlier, if you are serious about your business then register as many of the extensions as you can afford.

WordPress Permissions: Secure your WordPress Files and Directories

Wordpress LogoRe: How to secure WordPress, WordPress Directory and file permissions

WordPress can be a secure blog however an altering from the recommended file permission settings can leave your site open to getting hacked. It will happen, you will get hacked if you have directories set to 777.

To change file and directory permissions you can use any FTP application or even the Plesk File Manager.

By default all WordPress folders should have a chmod of 755 to help with accessing and executing the sub folder files. Most of the time, the installers mark all folders 755 which is the right setting but it is worth checking.

WordPress Files

All files starting with ‘wp-‘ (apart from the exceptions below) should be set to 644.

WordPress Directories

All directories starting with ‘wp-‘ (apart from the exceptions below) should be set to 755.

wp-config.php

The wp-config.php file is very important, the best setting for this file is 640.

.htaccess

The .htaccess file should be set to 644 as 640 would be too restrictive.

robots.txt

This file is important and should be set to 755 in order to allow search engines full access.

Hardening /wp-includes scripts

For additional protection, prevent scripts from running where they should not be for any user by adding the following entry to your WordPress .htaccess file:

# Block the include-only files.
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ – [F,L]
RewriteRule !^wp-includes/ – [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ – [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php – [F,L]
RewriteRule ^wp-includes/theme-compat/ – [F,L]

Update your Plugins

The majority of vulnerabilities are a result of insecure and outdated plugins. It is absolutely essential that you ensure you are running the latest versions of all plugins. Many plugin updates are released to close known vulnerabilities.

Further securing your WordPress blog

You can further secure your WordPress blog by reading 7 easy ways to secure WordPress

WordPress Upgrade: Download failed.: Could not create Temporary file

Re: WordPress Upgrade Failed, Download Failed, Could not create Temporary file

This problem can be caused by over-securing your WordPress installation – not a bad thing! Here is a quick way to get the upgrade working.

  1. CHMOD 777 the /wp-content folder
  2. Perform the WordPress Upgrade
  3. CHMOD 755 the /wp-content folder

If this fails, make sure you have the folder /wp-content/upgrade created.

Your WordPress should now upgrade successfully.