Linux

Linux
Whether Linux is difficult to learn depends on the person you are asking. Experienced UNIX users will say no, because Linux is an ideal ....

Wednesday, September 5, 2012

Shell Script To Encrypt Any Given Text File

In cryptography, encryption is the process of transforming information (referred to as plaintext) using an algorithm (called cipher) to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key. Mcrypt is a simple crypting program, a replacement for the old unix crypt. When encrypting or decrypting a file, a new file is created with the extension .nc and mode 0600. The new file keeps the modification...

Shell Script List All Top IP Address Accessing Apache Web Server

******************************** #!/bin/bash # Shell Script To List All Top Hitting IP Address to your webserver. # This may be useful to catch spammers and scrappers. # where to store final report? DEST=/var/www/reports/ips ...

Basic of Shell Script

What Is a Shell? Ø       The shell is a user program or it is an environment provided for user interaction. Ø       It is a command language interpreter that executes commands read from the standard input device such as keyboard or from a file. Ø       The shell gets started when you log in or open a console (terminal). Ø      ...

Linux log files location and how do I view logs files?

Q. I am new to Linux and I would like to know where are the log files located under Debian or Cento OS Linux server? How do I open or view log files? Ans. Almost all logfiles are located under /var/log directory (and subdirectory). You can change to this directory using cd command but you need to be the root user. You can use less, more, cat or tail command to see the logs. Go to /var/logs directory: ...

How do I rotate log files?

Q. How do I rotate log files under Linux operating system? A. You need use tool called logrotate, which is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large. With this tool you keep logs longer with less disk space. Default configuration...

Redhat Enterprise Linux 5 / CentOS 5 monitor and track TCP connections on the network

Q. How do I track and monitor connection for eth1 public network interface under Redhat Enterprise Linux (RHEL) 5 server? Ans.You can use netstat command or tcptrack command. Both command can show established TCP connection and provides the ability to monitor the same....

BASIC LDAP CONFIGURATION For RHEL / Centos / Fedora

INTRO: LDAP stands for Lightweight Directory Access Protocol. It is used as centralized data (or Directory) server (not database server) for various purposes. There is a difference between Directory server and a Database server. In Directory server the data is read more frequently than it is written. In Database server the data is written more frequently than it is read. Here we shall see how LDAP is used for creating centralized...

Monday, September 3, 2012

Linux: Iptables Examples For New SysAdmins Part -->3

Before see this post please read my previous post (Linux: Iptables Examples For New SysAdmins Part -->2) #12: Log and Drop Packets   Type the following to log and block IP spoofing on public interface called eth1 # iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j LOG --log-prefix "IP_SPOOF A: # iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP ...

Linux: Iptables Examples For New SysAdmins Part -->2

Before see this post please read my previous post (Linux: Iptables Examples For New SysAdmins Part -->1) #3: Delete Firewall Rules To display line number along with other information for existing rules, enter: # iptables -L INPUT  -n --line-numbers # iptables -L OUTPUT -n --line-numbers # iptables...

Linux: Iptables Examples For New SysAdmins Part -->1

Linux comes with a host based firewall called Netfilter. According to the official project site: netfilter is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack. This Linux based firewall is controlled by the program called iptables to...
Powered by Blogger.