May 042012
 

How to change the listening port for Remote Desktop
Here are simple steps with which you can change RDP port of your windows server.

Open registry editor by command regedit

Click on HKEY_LOCAL_MACHINE. Expand it to open the subkey upto PortNumber. The step by step subkey will be opened as

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber

Edit the value of by clicking Modify > Decimal

Type the new port no. and then click OK.

For windows 2008

Now you need to create new inbound TCP rule in windows firewall to allow connection on new RDP port.

For windows 2003

You need to add new RDP port in firewall exception.

Once done reboot your server to apply the changes.

May 032012
 

Generally error ’14: PYCURL ERROR 6′ occurs when yum fail to perform any operation like install, update etc.

If there is incorrect network setup on centos 6.2 like IP mismatch, incorrect resolver setup, this error generate.

Solution:

Check server IP if it is correct one.
Check resolver of the server and correct it.

Apr 282012
 

Following are the significant points which spot difference between parked domain and addon domain.

There is separate virtulahost create for addon domain while for parked domain there is no seperate virtual host. ServerAlias is used to add parked domain.

Addon domain has separate logs while parked domain has no separate logs.
Similarly it has separate stats for addon domain while parked domain do not have stats.

Addon domain can be treated as subdomain while parked domain is an ideal for multiple domains to shared same address.

Apr 282012
 

Here is the brief description about addon domains, parked domains and subdomains

Addon domains

An addon domain allows to add a new domain name in your account. The addon domain’s files will be stored in a subdirectory of your public_html folder. You can add multiple domains if allowed by your host in single account with the help of addon domains. They do not have separate cPanel but you can add email addresses, ftp accounts etc.. like main domain from your cPanel.

Parked domains

Parked domains do not have any content. They are use to show same webpages of the main domain. Generally thy used for seo purposes.

Subdomains

You can define subdomain as subsection of your main website. You can add multipl subdomains under your main subdomains. For example if you wsih to add blog on your site you can add subdomain blog.yoursitename.

It takes some time to propagate subdomain’s dns records as they do not have their special dns zone file on server.

Apr 212012
 

When your IP got blocked in cphulk database you can not remove it from WHM as cPanel has not offer this feature yet. You will have to flush cphulk database for this but this will remove other IPs too that is not recommended as far as security is concerned.

In order to remove particular IP from cphulk bruteforce database you will have to access database and has to remove that IP.

You can do this by two methods

1)Access database through shell
2)Access database through phpmyadmin

I will explain you first method as second one is relatively easy.

Access server with root user. Type in mysql as you will login to mysql shell. Now to connect database cphulkd type in

mysql> use cphulkd;

You will now connect to database cphulkd. Now type in sql query
just to confirm if your IP is really blocked there.

mysql> SELECT * FROM `brutes` WHERE `IP`=’x.x.x.x’;

If you are able to see your IP in brutes then simply remove it by

mysql> DELETE FROM `brutes` WHERE `IP`=’x.x.x.x’;

Once it done quit the mysql by typing

mysql> quit

In this way your IP will be removed from brute force and you will enjoy cPanel browsing.

Apr 132012
 

The default instance of the Microsoft SQL Server Database Engine listens on TCP port 1433. Attackers attack on port 1433 to hack sql server and make it highly unstable. Because of this many hosting providers change sql port other than 1433.

Here are quick steps to change mssql port.

Login to your server through RDP.
Open SQL Server Configuration Manager.

In SQL Server Configuration Manager, expand SQL Server 2008 Network Configuration, expand Protocols for ,
and then double-click TCP/IP.

In the TCP/IP Properties dialog box, on the IP Addresses tab, you will notice multiple IP addresses.
One of these are for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click Properties to identify the IP address that you wish to configure.

If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.

In the IPn Properties area box, in the TCP Port box, type the port number you wish this IP address to listen on, and then click OK.

In the console pane, click SQL Server 2008 Services.

Now you need to open the custome port in windows firewall. For this please refer to http://support.microsoft.com/kb/968872
Once it done in the details pane, right-click SQL Server () and then click restart, to stop and restart SQL Server.

After you have configured SQL Server to listen on a specific port there are three ways to connect to a specific port with a client application:

Run the SQL Server Browser service on the server to connect to the Database Engine instance by name.

 Posted by at 1:47 am
Apr 072012
 

Plesk control panel is provided with two mysql services on windows server. The first one is used for client’s databases and second one for plesk panel’s database itself.

If user experience attack on MySQL port it is better to change MySQL port on windows plesk server. Changing mysql port improves security of the server.

1. The client’s MySQL is installed to “%plesk_dir%\Databases\MySQL” folder by default. Its config file is located in “%plesk_dir%\Databases\MySQL\Data\my.ini” file.

2. MySQL server for Parallels Panel is installed to “C:\Program Files\Parallels\Plesk\MySQL\” folder, where config is “C:\Program Files\Parallels\Plesk\MySQL\Data\my.ini” file.

(If the plesk is installed on D: partition then path will be change)

To change port.

Open config file which is located in “%plesk_dir%\Databases\MySQL\Data\ and put the desired port by removing standard port 3306.

Save the file.

Now you need to add the new mysql port in firewall exception list.
Open windows firewall , click exception tab and add new port.

Restart MySQL service.

 Posted by at 1:48 am
Mar 272012
 

Command to remove frozen emails from the server.

exim -bpr | grep frozen | awk {‘print $3′} | xargs exim -Mrm

exiqgrep -zi|awk {‘print $3′}|xargs exim -Mrm

Command to check no. of frozen emails on server

exim -bp | grep -c frozen

Command to remove nobody emails.

exim -bpru|grep nobody|awk {‘print $3′}|xargs exim -Mrm

Remove mail older than 1 day
exiqgrep -o 86400 |awk {‘print $3′}|xargs exim -Mrm

Mar 242012
 

Centos is clone to red hat linux. It is linux distribution which use yum and rpm (red hat package manager) for package management.

You can install any software with the help of rpm on centos
Based upon operating system architecture (32 bit or 64 bit) you can download suitable rpm from the source URL and download it with the rpm command.

For example if you wish to install procmail on centos version 5.8 (32 bit)

Download procmail rpm from the URL http://mirror.centos.org/centos-5/5.8/os/i386/CentOS/ with wget command.

# wget http://mirror.centos.org/centos-5/5.8/os/i386/CentOS/procmail-3.22-17.1.el5.centos.i386.rpm

Once you download the rpm on server use rpm command to install it on your server.

# rpm -ivh package name,

# rpm -ivh procmail-3.22-17.1.el5.centos.i386.rpm

i= install
v= verbose
h= hash Print 50 hash marks as the package archive is unpacked.

Mar 162012
 

A site running drupal application was throwing Internal Server Error on linux plesk server.

When I checked apache error logs I noticed following logs

[Fri Mar 16 18:13:23 2012] [warn] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request function
[Fri Mar 16 18:13:34 2012] [warn] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request function
[Fri Mar 16 18:29:57 2012] [warn] (110)Connection timed out: mod_fcgid: ap_pass_brigade failed in handle_request function

The logs were appeared because php processes and traffic by site required more than the minimum total number of dynamic FastCGI application instances allowed to run at any one time without being killed off by the process manager.

In order to fix this issue we have increased the value of DefaultMaxClassProcessCount in /etc/httpd/conf.d/fcgid.conf

After that reconfigured plesk configuraation by running plesk utility websrvmng and restarted httpd service.

“/usr/local/psa/admin/sbin/websrvmng -av”

/etc/init.d/httpd restart