In this article we are going to check how to disable SELinux in Centos Box.SELinux brings lot of security measures to your Linux box.It will provide an additional level of access control mechanism to files and folders on top of normal Linux security tools.
Archive for the ‘Linux Security’ Category
NAT-Network Address Translation is used to communicate from one network to other network with different sub-net.So your Linux box will act as a gateway and will allow to communicate between two different networks.
password expiry for users is configuring in /etc/login.defs file.These are the password aging parameters PASS_MAX_DAYS Maximum number of days a password may be used. PASS_MIN_DAYS Minimum number of days allowed between password changes. PASS_WARN_AGE Number of days warning given before a password expires. By default PASS_MAX_DAYS will be 99999 days that means no password expiry.So we are going to configure password expiry for all users in 90 days and minimum days between password change is 1 day. Open /etc/login.defs and [...]
selinux is created by National Security Agency. NSA created a project to enforce Mandatory Access Control (MAC) inside the Linux Kernel which is known as Security Enhanced Linux or SELinux
Rsync: rsync is an application used in unix systems which synchronize files and directories between two machines.rsync behaves like rcp(remote file copy),but it much faster than rcp.because rsync sends the differences in the files instead of sending entire files. Servers are SERVER_SOURCE & SERVER_DESTINATION Configure SSH key authentication In SERVER_DESTINATION open sshd_config file vi /etc/ssh/sshd_config Then verify the following entries RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys save & exit Then restart ssh daemon /etc/init.d/sshd restart Then in SERVER_SOURCE, create a [...]
Login as root user Enter grub mode: # grub Use md5crypt to encrypt password: grub> md5crypt Password: ****** Encrypted: $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0 Copy encrypted password Exit grub mode: grub> quit Modify file /boot/grub/grub.conf: vi /boot/grub/grub.conf Insert this line after splashimage “password –md5 $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0″ splashimage=(hd0,0)/boot/grub/splash.xpm.gz password –md5 $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0 then save& exit /boot/grub/grub.conf
login as root and execute the following command #watch lsof -i To list all open Internet files, use: #lsof -i -U You can also get very specific about ports. Do this as root for low ports. #lsof -i TCP:3306 Or, look at UDP ports as follows: #lsof -i UDP:1812 Also try fuser. Suppose you have a mounted file-system, and you need to umount it. To list the users on the file-system /work #fuser -u /work To kill all processes accessing [...]
To monitor all Network Traffic Except Your Current ssh Connection, #tcpdump -i eth0 -nN -vvv -xX -s 1500 port not 22 To filter out port 123 as well getting the full length of the packet (-s 0), use the following: #tcpdump -i eth0 -nN -vvv -xX -s 0 port not 22 and port not 123 Or to filter only a certain host say 188.8.131.52 #tcpdump -i eth0 -nN -vvv -xX port not 22 and host 184.108.40.206 Just want ip addresses [...]
When a user starts a command, it runs with the permissions of that user. What if you want to allow them to run some commands with root permissions? You can, and that’s called suid.So SUID permission makes a script to run as the user who is the owner of the script, rather than the user who started it. You can set a command to be suid root with the chmod command. This will make it run as root even if [...]