Skip to main content

Posts

Showing posts from January, 2014

cphulk blacklisted ip- please follow to remove IP

Remove IP from cphulk blacklist
-------------------------------

Login in the shell as a root user and run the commands.

# mysql

   >USE cphulkd
   >SHOW tables;
   >BACKUP TABLE  brutes TO ‘/root/cphulk.log’;
   >SELECT * FROM brutes WHERE  IP=’[IP Address]‘;
   >DELETE  FROM  brutes WHERE  IP=’IP Address’;
   >quit;

 Replace “IP Address” as per your local machine ip address to resolve the issue.

============================================================
To delete all the brute force entries of blocked IPs,

mysql> delete from brutes;
mysql> delete from logins;

============================================================

Note:- To disable cPHulk through backend. ie, via terminal

# /usr/local/cpanel/bin/cphulk_pam_ctl --disable

Open DNS check for a domain

Open DNS check
--------------

dig domain @ip

for example
dig facebook.com @8.8.8.8


8.8.8.8 -- static IP of google.com

facebook.com not hosted on 8.8.8.8 but still the ip replies to the query since the name server recursion is enabled.

If enabled and allow query then that ip has open  dns and allow only selected range of ip's

Reset FTP password for a user in IIS

Reset FTP  password for a user in IIS
-------------------------------------
Right click on computer --> select manage --> Select users and groups --> select the user --(confirm the user form IIS)

then right click and select set password

Then go to IIS and select the user in IIS and Click on the domain name user -- click on Properties -- click on Directory security -- click on Authentication and access control -->  CLik on edit and set the new password at there.

Click ok and the domain will load fine

Clear DNS cache

========
Windows® 8

Press Win+X to open the WinX Menu.
Right-click on Command Prompt and select Run as Administrator.
Type the following command and press Enter: ipconfig /flushdns
If the command was successful, you will see the following message:

Windows IP configuration successfully flushed the DNS Resolver Cache.

Windows 7

Click the Start button.
Enter cmd in the Start menu search field.
Right-click on Command Prompt and select Run as Administrator.
Type the following command and press Enter: ipconfig /flushdns
If the command was successful, you will see the following message:

Windows IP configuration successfully flushed the DNS Resolver Cache.

Windows XP, 2000, or Vista®

Click the Start button.
On the Start menu, click Run....
If you do not see the Run command in Vista, enter run in the
Search bar.
Type the following command in the Run text box: ipconfig /flushdns

MacOS® 10.7 and 10.8

Click Applications.
Click Utilities.
Double-click the Terminal application.
Type the followi…

Qmail control folder impo folder for qmail

/var/qmail/control/databytes -- The maximum message size for emails defined by this file.(File for setting limits of mail)

/var/qmail/control/defaultdelivery -- The file which holds data that where the non-existent mails in the server should go. This is the folder which contains default delivery instructions.


/var/qmail/control/dhparam512.pem & dhparam1024.pem -- The files which stores the CA certificates which enables the secure mail transfer with qmail


/var/qmail/control/locals -- file which contain localhost as well as hostname entry. To receive mail for another host name just put that host name at this file .


/var/qmail/control/me -- file which contains the hostname of the server which is show in the full mail header of mails send from accounts in the server

For domains with mail service hosted in the server there should be entry in this two files - /var/qmail/control/ rcpthosts  & virtualdomains

/var/qmail/control/rejectnonexist --  list of domains  qmail will reject any…

Mysql Commands Cheat sheet for Linux plesk users

Mysql Commands
----------------

mysql -uadmin -p`cat /etc/psa/.psa.shadow` DATABASE_NAME == Access MySQL databases in Plesk

mysql -uadmin -p`cat /etc/psa/.psa.shadow` === root password for MySQL ==> Root is admin user in plesk

dbclient --direct-sql --sql="select * from misc" == windows plesk + mysql == dbclient utility for checking mysql db in plesk

Reset the Plesk MySQL Password
=====================================

1. /etc/init.d/mysqld stop

2. /usr/bin/ ?ls /usr/bin |grep mysql |grep safe? ?skip-grant-tables & (If the above command returns ?No such file or directory,?)

/usr/bin/safe_mysqld ?skip-grant-tables & (If the above command returns ?No such file or directory,?)

/usr/bin/mysqld_safe ?skip-grant-tables &

3. /etc/init.d/mysqld start

4. mysql;

5. use mysql;

6. update user set Password=password(?PLESK_PASSWORD?) where User=?admin?;

7. flush privileges;

8. quit

9. /etc/init.d/mysqld restart

========================================

mysqldump -u admin -p `…

Open VZ cheat Sheet

VZCTL COMMANDS
---------------------

vzctl set 101 --diskspace 1000000:1100000 --save  To set diskspace for container with ID 101

vzctl set 101 --diskinodes 90000:91000 --save     To set inodes for container with ID 101

vzctl set 101 --quotatime 600 --save              To set quotatime for container with ID 101 (The time limit by

                                                       which container is allowed to temporarily exceed  its quota soft limits)

vzctl exec 101 df                                  To execute command df at the server with the CTID 101

vzctl set 101 --quotaugidlimit 100 --save          Set number of user/group id's allowed for internal disk
                                                                     quota,if 0 UID/GUID quota will not be allowed\

 vzctl set 0 --dcachesize 5G --save        Set dcachesize of the hardware node

sysctl fs.fsync-enable=0     or  echo 0 > /proc/sys/fs/fsync-enable        disable fsync calls inside containers .

Add the  …

Qmail cheat sheet

http://supportlobby.com/blog/category/technical/qmail-technical/

========================
1) To check the mail queue in plesk from command line, you can use the command :

 /var/qmail/bin/qmail-qstat
========================

=========================
2) You can examine the queue with qmail-qread.

/var/qmail/bin/qmail-qread
=========================

=========================
3) From the qread command you get the message id . In the above example , let us assume one of the id is 524514 . Now you can find the file holding the email in/var/qmail/queue with find command.

# find /var/qmail/queue -iname 524514

/var/qmail/queue/remote/22/524514

/var/qmail/queue/mess/22/524514 (mail headers)

/var/qmail/queue/info/22/524514

4) From the mail header you get the IP address

vi /var/qmail/queue/mess/22/524514


Or

Shortcut for the cool guys
---------------------------------

find /var/qmail/queue -iname queu_id | grep mess | xargs less

=========================

=========================
4) If you wish …

Plesk ftp password and username correct, but not able to login (Windows Plesk Server)

Solution
--------

1. Go to server ---> open the inetpub-> vhosts

2. Select the properties of domain and check whether IIS and plesk user
   is present in the users list.

3. If not add plesk user from plesk panel and IIS user from IIS domain
   properties -> Directory Security -> Authentication and access control

4. Use the username at their and add it to domain users and the plesk user
   to solve the issue.

Rsync in Windows

To perform Rsync in windows
-------------------------------------------

http://www.cygwin.com/setup-x86_64.exe

select rsyc while installation

rsync -avz --numeric-ids --progress --exclude '*.grp' /cygdrive/e/SmarterMail/* /cygdrive/d/SmarterMail/


rsync -avz --numeric-ids --progress  /cygdrive/z/SmarterMail/* /cygdrive/d/SmarterMail/

rsync -avz --numeric-ids --progress  --exclude '*.cfg' --exclude '*.xml' --exclude '*.db' --exclude '*.stat3' --exclude '*.dll'  --exclude '*.exe' /cygdrive/g/SmarterMail/* /cygdrive/d/SmarterMail/

rsync -avz --numeric-ids --progress --include '*/' --include '*.grp' --exclude '*' source/ target/

To white list bulk sender mails - Gmail / Microsoft

To solve problem of mails going to spam folder in Gmail / Microsoft Outlook
-------------------------------------------------------


1.  Make sure that the domain has SPF record.

2. It will be better if the domain has an SSL certificate.

3. Try to assign RDNS for the domain.

4. Try to use below

For Google send mail to : http://mail.google.com/support/bin/request.py?contact_type=bulk_send&hl=en

For microsoft hotmail users : delist@messaging.microsoft.com . Send mail to this mail account and they will contact you.