Cpanel Hosting

Saturday, 23 March 2013

How to reset bandwidth for a domain in WHM/CPANEL using Shell !!!


You can follow below steps to reset bandwidth of a Domain in cpanel server through Shell :

************************************************

    ssh to your server
    cd /var/cpanel/bandwidth.cache/
    vi domainname.com and/or vi username
    replace contents with 0
    save and quit

************************************************

Tuesday, 12 March 2013

How insecure is SNMP protocol !!


SNMP itself does not define which information (which variables) a managed system should offer. Rather, SNMP uses an extensible design, where the available information is defined by management information bases (MIBs). MIBs describe the structure of the management data of a device subsystem; they use a hierarchical namespace containing object identifiers (OID).
SNMP is based on the manager/agent model consisting of an SNMP manager, an SNMP agent, a database of management information, managed SNMP devices and the network protocol.SNMP was derived from its predecessor SGMP (Simple Gateway Management Protocol) and was intended to be replaced by a solution based on the CMIS/CMIP (Common Management Information Service/Protocol) architecture. This long-term solution, however, never received the widespread acceptance of SNMP.
SNMP traps obviously contain information specific to the SNMP protocol such as Enterprise ID, Generic Trap and Specific Trap. Since SNMP is a UDP-based protocol and messages can therefore be lost, SNMP traps should be avoided where events can be received through other mechanisms such as log file encapsulation.
Summary:
  • Not very secure
  • SNMP version 2 is addressing this
  • Extended security is possible with current protocol (example: DES and MD5)
  • Does not reduce its power for monitoring




How insecure is SNMP protocol !!


SNMP itself does not define which information (which variables) a managed system should offer. Rather, SNMP uses an extensible design, where the available information is defined by management information bases (MIBs). MIBs describe the structure of the management data of a device subsystem; they use a hierarchical namespace containing object identifiers (OID).
SNMP is based on the manager/agent model consisting of an SNMP manager, an SNMP agent, a database of management information, managed SNMP devices and the network protocol.SNMP was derived from its predecessor SGMP (Simple Gateway Management Protocol) and was intended to be replaced by a solution based on the CMIS/CMIP (Common Management Information Service/Protocol) architecture. This long-term solution, however, never received the widespread acceptance of SNMP.
SNMP traps obviously contain information specific to the SNMP protocol such as Enterprise ID, Generic Trap and Specific Trap. Since SNMP is a UDP-based protocol and messages can therefore be lost, SNMP traps should be avoided where events can be received through other mechanisms such as log file encapsulation.
Summary:
  • Not very secure
  • SNMP version 2 is addressing this
  • Extended security is possible with current protocol (example: DES and MD5)
  • Does not reduce its power for monitoring




Saturday, 9 March 2013

To display the default Apache page how do I set the primary IP address for my cPanel environment !!!


To display the default Apache page how do I set the primary IP address for my cPanel environment .

Log into your cPanel web server via Secure Shell (SSH).

Located the httpd.conf file using the following command:

located httpd.conf
Open the httpd config file found in step 2 using the following command:

pico /usr/local/apache/conf/httpd.conf
Find the first VirtualHost container in the file. It will look similar to the following: (xx.xx.xx.xx will be the primary IP address of your server)

BytesLog domlogs/cptemp.safesecureweb.com-bytes_log ServerName cptemp.safesecureweb.com DocumentRoot /usr/local/apache/htdocs
Above this section, add the following:

ServerAlias xx.xx.xx.xx ServerAdmin admin@domain.com DocumentRoot /usr/local/cpanel/htdocs ServerName xx.xx.xx.xx
Save and exit the file.

Test the config file to ensure the text you entered is properly formatted using the following command:

/etc/init.d/httpd configtest
Assuming the test returns the message Syntax OK, restart Apache using the following command:

/etc/init.d/httpd restart
The restart of Apache will make your websites unavailable for a few seconds.

How to configure cPanel !!!


Open a web browser and connect to your cPanel Control Panel located at https://ip address:2087.
Login as the Administrator using the information sent to you in your setup email.
Under the Welcome message click Next.
Read the cPanel license agreement and click I Agree.
Enter the requested information:

Main Shared Virtual Host IP: enter the IP of your VPS Hostname: enter your domain name. If you do not currently have a domain name, you can ignore this field Primary Nameserver: enter the primary name server for your domain name; if you are using HostMySite's nameserver, enter ns1.lnhi.net Secondary Nameserver: enter the secondary name server for your domain name; if you are using HostMySite's nameserver, enter ns2.lnhi.net Tertiary Nameserver: enter the tertiary name server for your domain name; if you are using HostMySite's nameserver, enter ns3.lnhi.net
Click Save.
Click Next Step to begin the Initial Quota Scan.
Click Next Step to continue past the Setup Nameserver screen.
Click Next Step to continue past the Setup Resolver Config screen.
For Step 6, enter a root MySQL password and click Change Password.
Click Finish.