Fun at work!

Posts tagged ‘Linux’

Repost: CentOS SSH Installation And Configuration

How do I install and configure ssh server and client under CentOS Linux operating systems?

You need to install the following packages (which are installed by default until and unless you removed it or skipped it while installing CentOS)

  • openssh-clients : The OpenSSH client applications
  • openssh-server : The OpenSSH server daemon

Read more…

Advertisements

Repost: Setup FTP Server step by step in CentOS / RHEL / Scientific Linux 6.3/6.4/6.5

This tutorial shows you how to install and configure FTP server in CentOS 6.5. Though the steps provided here are tested in CentOS 6.5, it should work on RHEL 6.x(x stands for version) and Scientific Linux 6.x too. In this tutorial my ftp server ip and hostname are 192.168.1.200 and mainserver.ostechnix.com respectively. I have already configured a local repository and i am gonna to install FTP from my local repository. For more information navigate to setup your local repoistory in CentOS 6 / RHEL 6 / Scientific Linux.

Read more…

Install GUI Setup Tools on CentOS 6.x

# yum install setuptool system-config-securitylevel-tui authconfig system-config-network-tui system-config-firewall-tui ntsysv system-config-keyboard

To correct Firewall Configuration Error:

# yum install dbus
# service messagebus start
Starting system message bus: [ OK ]
# chkconfig messagebus on

Repost: How to check if your Linux server is under DDOS Attack?

Login to your server as root and fire the following command, using  which you can check if your server is under DDOS attack or not:
netstat -anp |grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort –n
This command will show you the list of IP’s which have logged in is maximum number of connections to your server.

ddos becomes more complex as attackers  use fewer connections with more number of attacking IP’s.In such cases, you should get less number of connections even when your server is under ddos.One important thing that you should check is the number of active connections that your server currently has.For that execute the following command:
netstat -n | grep :80 |wc –l
The above command will show the active connections that are open to your server.

You can also fire the following command :
netstat -n | grep :80 | grep SYN |wc –l
Result of active connections from the first command will vary but if it shows connections more than 500, then you will be definitely having problems. If the result after you fire second command is 100 or above then you are having problems with sync attack.

Once you get an idea of the ip attacking your server, you can easily block it.

Fire the following command to block that ip or any other specific ip:

route add ipaddress reject

Once you block a paricular IP on the server, you can even crosscheck if the IP is blocked or not

by using the following command:

route -n |grep IPaddress

You can also block a IP with iptables on the server by using the following command.

iptables -A INPUT 1 -s IPADRESS -j DROP/REJECT

service iptables restart

service iptables save

After firing the above command, KILL all httpd connection and than restart httpd service by

using following command:

killall -KILL httpd

service httpd startssl

Read more…

Repost: How to install Puppet server and client on CentOS and RHEL

As a system administrator acquires more and more systems to manage, automation of mundane tasks gets quite important. Many administrators adopted the way of writing custom scripts, that are simulating complex orchestration software. Unfortunately, scripts get obsolete, people who developed them leave, and without an enormous level of maintenance, after some time these scripts will end up unusable. It is certainly more desirable to share a system that everyone can use, and invest in tools that can be used regardless of one’s employer. For that we have several systems available, and in this howto you will learn how to use one of them – Puppet.

What is Puppet?

Puppet is an automation software for IT system administrators and consultants. It allows you to automate repetitive tasks such as the installation of applications and services, patch management, and deployments. Configuration for all resources are stored in so called “manifests”, that can be applied to multiple machines or just a single server. If you would like to know more information, The Puppet Labs site has a more complete description of what Puppet is and how it works.

Read more…

Repost: Linux vs. Unix

Linux is an open source, free to use operating system widely used for computer hardware and software, game development, tablet PCS, mainframes etc. Unix is an operating system commonly used in internet servers, workstations and PCs by Solaris, Intel, HP etc.

Read more…

Repost: How To Use Linux Screen

Linux Screen allows you to:

  • Use multiple shell windows from a single SSH session.
  • Keep a shell active even through network disruptions.
  • Disconnect and re-connect to a shell sessions from multiple locations.
  • Run a long running process without maintaining an active shell session.

Read More…

Tag Cloud