Fun at work!

Archive for the ‘System Administration’ Category

Repost: 5 Common Server Setups For Your Web Application

Introduction

When deciding which server architecture to use for your environment, there are many factors to consider, such as performance, scalability, availability, reliability, cost, and ease of management.

Here is a list of commonly used server setups, with a short description of each, including pros and cons. Keep in mind that all of the concepts covered here can be used in various combinations with one another, and that every environment has different requirements, so there is no single, correct configuration.

Read more…

Repost: How to Password Protect a Directory on Your Website

Password protecting a directory on your site is actually fairly easy. Webmasters typically want to protect a directory if they have information that they want to make available only to a selected number of people. This guide teaches how you can make a folder on your website accessible only to people with the appropriate password.

Read more…

Repost: HOWTO: IPTables on Debian/Ubuntu

Contents

Read more…

StackOverflow Forum Repost: Redirecting the output of svnadmin dump to another server

StackOverflow: Redirecting the output of svnadmin dump to another server

Repost: Install svn server on centos 6

SVN – Apache subversion

SVN – Subversion is a versioning and revision control system used by developers to track and keep up earlier versions of their source codes.

In this article we can see how to setup svn server on centos 6.

 

Read more…

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…

Repost: How to compute the MD5 or SHA-1 cryptographic hash values for a file

You can use the File Checksum Integrity Verifier (FCIV) utility to compute the MD5 or SHA-1 cryptographic hash values of a file. For additional information about the File Checksum Integrity Verifier (FCIV) utility, click the following article number to view the article in the Microsoft Knowledge Base:

To compute the MD5 and the SHA-1 hash values for a file, type the following command at a command line:
> FCIV -md5 -sha1 path\filename.ext

For example, to compute the MD5 and SHA-1 hash values for the Shdocvw.dll file in your %Systemroot%\System32 folder, type the following command:

> FCIV -md5 -sha1 c:\windows\system32\shdocvw.dll

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…

How to check MySQL version?

On the command line, enter the command:

 

# mysqladmin -uroot -p -hlocalhost version

Enter password: ********

mysqladmin  Ver 8.42 Distrib 5.1.73, for redhat-linux-gnu on x86_64
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          5.1.73
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 16 hours 18 min 39 sec

Threads: 1  Questions: 296  Slow queries: 0  Opens: 25  Flush tables: 1  Open tables: 18  Queries per second avg: 0.5

 

There you can get the version of MySQL.

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…

Tag Cloud