Posts

Enabling DomainKeys and SPF record in cPanel server

On CPanel servers most of the work is done using cpanel username which then reflect setting on particular domains. To enable DomainKey/SPF You can use the following steps: Login to Cpanel >>Select Email Authentication, from mail session Enable Domain Keys and Enable SPF Or you can do these things from the back-end, as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1)To Add Domainkeys for a single user use the command: # /usr/local/cpanel/bin/domain_keys_installer username 2)To Add DomainKey for all Cpanel users you can use: ls /var/cpanel/users | while read a; \ do \ /usr/local/cpanel/bin/domain_keys_installer $a \ done or simply use the step 1 for all users. 3) To add SPF for a single account # /usr/local/cpanel/bin/spf_installer account-name 4) To add SPF for all cpanel users ls /var/cpanel/users | while read a; do /usr/local/cpanel/bin/spf_installer $a done Enjoy :)

Configuration files in plesk

As plesk is a fully efficient front end tool, we don't recommend you to change the context of configuration files and you can do almost all the tasks from front end itself except some tweak settings. Below attached is a set of plesk back end files which you can edit, before editing the configurations please make sure to take a back up of each files.  +++++++++++++++++++++++++++++++++++++++++++++++++++ Plesk root directory : /usr/local/psa Version : /usr/local/psa/version Admin password is stored : /etc/psa/.psa.shadow Plesk configuration file : /etc/psa/psa.conf Restart Plesk : /etc/rc.d/init.d/plesk restart Apache ———- Main httpd configuration file : /etc/httpd/conf/httpd.conf Plesk httpd : /etc/httpd/conf.d/zz010_psa_httpd.conf Include conf files are under : /etc/httpd/conf.d (depends on the location specified in main httpd) Startup script for plesk apache : /usr/local/psa/admin/bin/httpsdctl start Apache main log files under : /var/log/httpd ...

Creating new user for MSSQL database

You can login to the IP address, but you must create a user to connect to that database, you can create a user as follows:- Select SQL Server Management Studio >> Connect To your server >> Expand Your server >> Expand Security >> Logins >> Right Click >> New login Give login name >> give username >> select SQL Server Authentication (By default windows authentication) >> Select your database in the “default database field” Select Server Roll tab >> give proper rolls (dbcreator) Select User mappings tab >> select your database >> give proper database roll memberships (select all) This will create a user who can connect remotely, but due to some bug you need to do some more things. Expand Databases >> select your database >> Expand Security >> select Users >> delete the created user Right click >> New User >> Give user name >> For login name ...

Some useful tips

Tip1. Single command to set user password:- # usermod -p $(echo newpass | openssl passwd -1 -stdin) u1 Tip2. Recovering deleted images from flash cards:- # aptitude update # aptitude install testdisk The tool which we are using is "photorec". Now we are going to remount the flash disk. # dd if=/dev/sdd1 of=disk.img bs=1024M # mkdir ./recovered # photorec /d ./recovered disk.img The recovered file will be in the directory ./recovered.  Tips. Securely erasing files, by filling your disk:- # aptitude update # aptitude install secure-delete Once installed you can overwrite the unused content of any mounted partition like so: # sfill /home # mount | grep /dev Once completed, the huge file is removed, meaning you have free disk space again.

Error: iptables v1.3.5: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)

Sometimes you get the following error while configuring “Port forwarding” rules” in a VPS: ~~~~~~~ Error: iptables v1.3.5: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?) ~~~~~~~ Fix: You need to run the following command to fix the issue: ~~~~~~~ vzctl set <VPS_ID> –-iptables “iptable_nat iptable_filter iptable_mangle ip_conntrack ipt_conntrack ipt_REDIRECT ipt_REJECT ipt_multiport ipt_helper ipt_LOG ipt_state” –-save ~~~~~~~ P.S:- Replace <VPS_ID> to your actual VPS id. The issue should be fixed now. :)

How to install ffmpeg on CentOS or RHEL

To install ffmpeg on CentOS or RHEL/Redhat Enterprise Linux, you need to follow the steps mentioned below: # vi /etc/yum.repos.d/dag.repo Insert the following: [dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=1 enabled=1 Add the /usr/local/lib to /etc/ld.so.conf Then run: # ldconfig -v Then run the following: # rpm -Uvh http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el4.rf.i386.rpm # yum update # yum install ffmpeg ffmpeg-devel Done. :)

How to create an FTP Account in Linux

Create a FTP user group. eg: ftpaccounts #/usr/sbin/groupadd ftpaccounts Add a new user to this group, and set the default path of that user to /home/user/. #/usr/sbin/adduser -g ftpaccounts -d /home/user/ testuser Set a password for the newley created user. #passwd testuser Set ownership of /home/user to the testuser and ftpaccounts. #chown testuser:ftpaccounts /home/user Give Read/Write access to testuser and all members in ftpaccounts #chmod 775 /home/user Edit /etc/vsftpd/vsftpd.conf file and make sure 'local_enable=YES' is uncommented. Restart the vsftpd service. #/etc/init.d/vsftpd restart

Outlook mail settings

Sometimes your emails are working fine in your webmail but in any email client, its not working. Please follow the steps given below to verify the email account settings in outlook. 1) Open Outlook, click Tools -> Account Settings 2) Click on the relevant email account and click the Change button at the top of the window 3) Under server information, use the following settings. Incoming mail server: mail.yourdomain.com Outgoing Mail Server: mail.yourdomain.com 4) Click on the More Settings button 5) Select the Outgoing Server tab 6) Check the option "My server requires authentication" 7) Check the option "Use same settings as my incoming mail server" 8) Select the Advanced tab and use port 25 for outgoing port. 9) Incoming port should be 110 for pop3 configuration and 143 for IMAP configuration. 10) Save the configuration by clicking on the Ok button.  The emails should work in Outlook now. If you still find any issue, you need to contact your ser...

How to add new servers to Nagios

Steps to add new servers to Nagios: To add a host 1. Go to the folder /usr/local/nagios/etc 2. Add entires in following files. > hosts.cfg > hostgroups.cfg > services.cfg Note: Please make sure that you are backing up these files with date & time before modifying it. To check syntax # cd ../libexec # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Finally, restart Nagios as given below. Stop Nagios. # /usr/local/etc/rc.d/nagios stop Check whether Nagios is running. # ps aux | grep nagios If so, kill all Nagios. # kill -9 `pgrep nagios` Start Nagios again. # /usr/local/etc/rc.d/nagios start Thank you.

The update of Parallels Panel has failed

Issue: After clicking on ‘Update’ button in Plesk Control Panel, browser opens a new tab at the URL https://server_address:8447. But it never opens and the browser displays a blank page. In Parallels Plesk Panel version 10, port 8447 is used for autoinstaller wizard. Please make sure that port 8447 is not blocked on your server by firewall using the following commands: # iptables -L | grep 8447  # telnet localhost 8447 # netstat -anp |grep 8447 The issue occurred as the service 'autoinstaller' which is used to upgrade Plesk stopped running in the server. This service listens on port 8447. Hence when the service is not running, the connection to it will be refused. Run the following script to fix the issue: ~~~~~~~~~~ # /usr/local/psa/admin/bin/autoinstaller --service-mode=update --enable-xml-output ~~~~~~~~~~ The issue should be fixed now. You need to upgrade Plesk always from the back end to avoid this issue. Thank you.