Creating Automatic Python Firewall Script in Ubuntu

Published: 12 June 2023
on channel: theurbanpenguin
2,978
95

In this video you will use a Python script on Ubuntu to manage automatic firewall entries on and AWS hosted Ubuntu system. You standard AWS system group will allow SSH traffic in and really has to, allowing remote management and access. By opening up SSH there will be many scripted attacks on your system . Although we could use products like fail2-ban, automating the protection yourself helps you learn and manage your system better.

Additionally you can find my video courses on Pluralsight: http://pluralsight.com/training/Autho... and take time to see my own site http://www.theurbanpenguin.com

00:00 Introduction
00:30 Demo of the final solution
03:50 View problem on new system
05:01 Start editing python script
08:55 Run first draft of script
10:23 Add regular expression to search for IP addresses
14:30 Run 2nd draft of script
15:12 Enable UFW
16:46 Install pip
17:32 Install pyufw python module
18:20 Add UFW support to script
20:50 Run final script
21:58 Add crontab entry


Watch video Creating Automatic Python Firewall Script in Ubuntu online without registration, duration hours minute second in high quality. This video was added by user theurbanpenguin 12 June 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,978 once and liked it 95 people.