firewall(iptables)

This Linux based firewall is controlled by the program called iptables to handles filtering for IPv4, and ip6tables handles filtering for IPv6. I strongly recommend that you first read ourquick tutorial that explains how to configure a host-based firewall called Netfilter (iptables) under CentOS / RHEL / Fedora / Redhat Enterprise Linux. This post list … Continue reading firewall(iptables)

samba

[root@server-rhel6 ~]#yum install -y samba [root@server-rhel6 ~]#mkdir /sharedrepo [root@server-rhel6 ~]#groupadd staff [root@server-rhel6 ~]#chgrp -R staff /sharedrepo/ [root@server-rhel6 ~]#chmod -R 777 /sharedrepo/ [root@server-rhel6 ~]#cd /sharedrepo/ [root@server-rhel6 ~]#touch one [root@server-rhel6 ~]#chcon -R -t samba_share_t /sharedrepo/ [root@server-rhel6 ~]#semanage fcontext -a -t samba_share_t /sharedrepo/ [root@server-rhel6 ~]#yum provides /usr/sbin/semanage [root@server-rhel6 ~]#yum install policycoreutils-python [root@server-rhel6 ~]#setsebool -P samba_enable_home_dirs on [root@server-rhel6 ~]#useradd … Continue reading samba

Log-Rotation

Managing log files effectively is an essential task for Linux sysadmin. Rotate the log file when file size reaches a specific size Continue to write the log information to the newly created file after rotating the old log file Compress the rotated log files Specify compression option for the rotated log files Rotate the old … Continue reading Log-Rotation

RAID (Redundant Array of InExpensive Disks) & Logical Volume Manager

[root@RAID ~]# lsblk  NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT loop0    7:0    0  3.6G  1 loop /mnt/iso sda      8:0    0   20G  0 disk ├─sda1   8:1    0  300M  0 part /boot ├─sda2   8:2    0 17.7G  0 part / ├─sda3   8:3    0  104M  0 … Continue reading RAID (Redundant Array of InExpensive Disks) & Logical Volume Manager

backup & recovery

Backup and Recovery Full Backup Full backup is a method of backup where all the files and folders selected for the backup will be backed up.  When subsequent backups are run, the entire list of files and will be backed up again. The advantage of this backup is restores are fast and easy as the … Continue reading backup & recovery

quotas

Disk quotas are commonly used by ISPs, by Web hosting companies, on FTP sites, and on corporate file servers to ensure continued availability of their systems. Quotas are used to limit a users or a group of users ability to consume disk space. This prevents a small group of users from monopolizing disk capacity and … Continue reading quotas

user&group administration

User and Group Administration To add a new user account, you can run either of the following two commands as root. adduser tom useradd jerry [root@machine1 ~]# cat /etc/passwd | grep tom tom:x:501:501::/home/tom:/bin/bash [root@machine1 ~]# cat /etc/passwd | grep jerry jerry:x:502:502::/home/jerry:/bin/bash ----------------------------------------------------------------------------------------------------------------------- View a List of All Groups To view all the groups on the … Continue reading user&group administration

ssh-keys concept

SSH-KEYGEN(password less authentication) ssh-keygen is a Unix utility that is used to generate, manage, and convert authentication keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or … Continue reading ssh-keys concept

Trouble Shoot Unable to Login As Root Through SSH

 mohammedrafi@NOC-RAFI:~$ ssh -v root@192.169.170.133 OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to 192.169.170.133 [192.169.170.133] port 22. debug1: Connection established. debug1: identity file /home/mohammedrafi/.ssh/id_rsa type 1 debug1: identity file /home/mohammedrafi/.ssh/id_rsa-cert type -1 debug1: identity file /home/mohammedrafi/.ssh/id_dsa type -1 debug1: identity file /home/mohammedrafi/.ssh/id_dsa-cert … Continue reading Trouble Shoot Unable to Login As Root Through SSH

apache codes

Apache Status Codes Apache Status Code Informational 100 - Continue A status code of 100 indicates that (usually the first) part of a request has been received without any problems, and that the rest of the request should now be sent. 101 - Switching Protocols HTTP 1.1 is just one type of protocol for transferring … Continue reading apache codes