The timezone is set by the file /etc/localtime. In order to set this up corectly on your Dedicated Server you will need to first remove /etc/localtime and then create a symlink to the correct zonefile in /usr/share/zoneinfo. You will then want to run ntpdate to sync up properly. cd /etc rm -rf localtime ln -s […]
Archive for the ‘Linux’ Category
Email notification of Root Login
Keeping track of who logs into your Dedicated Server and when is very important, especially when you’re dealing with the super user account. We recommend that you use an email address not hosted on the server your sending the alert from. So lets get started! 1. Login to your server and su to root. 2. […]
Create an SSH banner.
Adding a banner to your Dedicated Server is extremely easy to do. It is comprised of 2 steps. 1.) Edit your sshd_config file located at /etc/ssh/sshd_config and add the folowing line: Banner /etc/banner 2.) Now you need to create this file. Using your favorite editor, just create the new file and put whatever you would […]
Disable IPV6 on linux server.
For security reason its always better tio disable IPV6 on Linus server, as IPV6 traffic is not filter by server firewall. Refer following steps to disable IPV6. Login in to server as root user and open networking file. root@server[~]#pico /etc/sysconfig/network Add following two lines in the end of network file. NETWORKING_IPV6=no IPV6INIT=no save network file […]
How to check server 32 or 64 bit?
Its very common issue, every new techie not sure about server bit at that time simply run following command to get bit information. getconf LONG_BIT
Three steps to mount remote directory on Linux Server
We can mount the remote directory on the Linux Server by using the following three simple commands only. Login in to the server as a root user and run the commands one by one and make sure that you are using your own remote server ip instead of our test server ip198.168.0.2 yum install fuse-sshfs […]
How to add nameservers from shell.
Most of the time on cPanel dedicated server we add nameservers from WHM but some time we are not able to access WHM. In that case we can add nameservers from shell by using root login details. Login in to server as root user and run following commands. root@server[~]#/scripts/adddns –domain ns1.your_domain.com –ip=111.222.222.1 root@server[~]#/scripts/adddns –domain ns2.your_domain.com […]
Simple steps for SSH Server Hardening.
SSH Server Hardening in one of the security part to secure your server.Refer following steps to secure SSH. root@serevr[~]#pico /etc/ssh/sshd_config Uncomment #Protocol 2, 1 Change to Protocol 2 Append these lines to the bottom: LoginGraceTime 120 IgnoreRhosts yes X11Forwarding no Save file and restart the SSH service. root@serevr[~]#/etc/rc.d/init.d/sshd restart Note : SSH Protocol one based servers […]
How to define iptables rules save option?
iptables creating rules after restarting the iptables. When iptables service is restarted settings from /etc/sysconfig/iptables file are applied and used with the iptables. You can either set up iptables rule so that current stat is saved the rule upon restart or stop/start: You need to make changes in following file as per your requirement for […]
How to disable root login and enable key authentication on Dedicated server?
How to disable root login and enable key authentication on Dedicated server? Refer following steps to disable direct root login. 1. SSH into your server as root user. 2. Open file sshd_config in your favorite editor pico /etc/ssh/sshd_config 3. Find the line Protocol 2, 1 4. Uncomment line and change it to look like Protocol […]



