Question: Using an Ubuntu Linux machine in the Linux lab, create a bash shell script to block IP addresses of ssh attackers. Your script should analyze

Using an Ubuntu Linux machine in the Linux lab, create a bash shell script to block IP addresses of ssh attackers. Your script should analyze the sample authentication log file and create a syslog entry for each IP address with more than 10 invalid login attempts. Your script should also create an IP tables firewall rule to block each IP address with more than 10 invalid login attempts.
*** The sample authentication log may be downloaded from the "Final project" assignment on Canvas.
After testing your "block" script, create a cron job to run your "block" script every 15 minutes of every day.
Next, create a second bash shell script to reset the IP tables firewall. The purpose of the second script is to remove all the blocked IP addresses by restoring the basic IP tables firewall.
Finally, create a cron job to run your "reset" script at 11:59 p.m. every Sunday.
Copy and paste the following items into a document and upload the file to the "Final project" assignment on Canvas.
Your "block" bash shell script
A long directory listing showing your "block" script filename and permissions
The line added to the cron job configuration file to run your "block" script
An IP tables verbose listing showing at least one block rule added by your "block" script
A tail of syslog showing at least one log entry added by your "block" script
Your "reset" bash shell script
A long directory listing showing your "reset" script filename and permissions
The line added to the cron job configuration file to run your "reset" script
Use the following rules for your "basic" IP tables firewall.
Using an Ubuntu Linux machine in the Linux lab,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!