DMARC

DMARC is used to protect your email from email spoofing. DMARC use SPF and DKIM record to validate your email. DMARC is a TXT record added in your domain DNS. DMARC record look like v=DMARC1;p=POLICY_HERE;pct=100;rua=mailto:postmaster@your-domain.com;ruf=mailto:admin@your-domain.com;rf=afrf p=POLICY_HERE This specifies what to do with incoming email that fails DMARC. Valid options are none, quarantine and reject. p=none … Read more

Logging Linux Commands for all users

To log commands executed by users on Linux shell, edit file vi /etc/bash.bashrc Add export PROMPT_COMMAND=’RETRN_VAL=$?;logger -p local6.debug “$(whoami) [$$]: $(history 1 | sed “s/^[ ]*[0-9]\+[ ]*//” ) [$RETRN_VAL]”‘ Create file vi /etc/rsyslog.d/bash.conf Add local6.* /var/log/commands.log Restart rsyslog systemctl restart rsyslog Now log off and login, you will be able to see all commends executed … Read more

Adding Backup Disk on a Linux Server

It is better to have a second hard disk on servers for backup. Here, we will partition a fresh disk, format and mount it as /backup. Replace /dev/sdX with the actual device name of your backup disk. Now you need to find the UUID for this new drive with the command Create a folder to … Read more

How to extract RAR file in Linux

unar is a utility to extract rar archive files. Using unrar To extract a rar file, run unrar x filename.rar Install unare on Ubuntu/Debian To install unrar on Ubuntu/Debian, run apt install unrar -y Install Unrar from source Download unrar from http://www.rarlab.com/download.htm cd /usr/local/src wget https://www.rarlab.com/rar/rarlinux-x64-6.0.b1.tar.gz tar zxvf rarlinux-x64-6.0.b1.tar.gz cd rar cp rar unrar /usr/bin