Overview
- As a Linux System Admin I’m always need to monitor system logs for any unauthorized activity like brute force attack or co-worker trying to guess the server passwords.
- In this kind of situation system generate a special message in
/var/log/auth.log
file calledauthentication failure
.
Installation
Debian/Ubuntu Linux
Redhat/CentOS Linux
Twitter Setup
Create New Twitter Account For Servers
- Personal Twitter Account
- We need one Personal and one Private Twitter account.
- All the security alert messages posted on Private Twitter Account (MiteshAlert)
- I’m (MiteshShah05) the only follower of Private Twitter Account (MiteshAlert) so our security messages only display for me.
Install Twitter CommandLine Client t
- For More Detailed Information about Install and Configure t Click Here
Configure t
Security Alert
- You should need to create a crontab entry for the following shell script.
- So the following shell script runs every 10 minutes automatically.
Sample Tweet
12:01:47 sshd[32239]: authentication failures; uid=0 tty=ssh ruser= rhost=X.XX.XX.XX
— Mitesh Shah (@MiteshAlert) June 29, 2015
Get SMS UpdateFor Above Tweets
- Open Serever Private Twitter Account Page from your Personal Twitter Account
- Click on Settings
- Click on Turn on mobile notifications.
<img alt “Security Alert” src=”https://cloud.githubusercontent.com/assets/1223371/8515662/02129d2e-23c5-11e5-8e84-45eb20a9ced2.png”>
- Feel free to comment below in case you face any problem.