In a follow up to - • 2025 Linux Admin - Installing Apache HTTPD...
In this follow-up video, we expand on EC2 User Data and firewall management by diving deeper into advanced firewalld features on Amazon Linux. Learn how to configure network masquerading and set up port forwarding to secure and control traffic effectively on your Linux EC2 instances.
Highlights include:
Reviewing existing firewall settings
Adding masquerading to allow outbound NAT for private networks
Configuring port forwarding to redirect external traffic on a custom port (22222) to SSH on port 22
Verifying firewall rules and testing connectivity
This tutorial is perfect for AWS learners aiming to enhance their Linux networking skills and is relevant for certifications such as:
AWS Certified SysOps Administrator – Associate
AWS Certified Solutions Architect – Associate
AWS Certified Cloud Practitioner
CompTIA Linux+
LPIC-1 Linux Administrator
Red Hat Certified System Administrator (RHCSA)
By the end of this video, you will be able to secure network traffic and enable remote SSH access through customized firewall rules on your Amazon Linux EC2 instances.
History
27 sudo firewall-cmd --list-all
28 sudo firewall-cmd --zone=public --add-masquerade
29 sudo firewall-cmd --list-all
30 sudo firewall-cmd --zone=public --add-forward-port=22222:proto=tcp:toport=22
31 sudo firewall-cmd --zone=public --add-forward-port=port=22222:proto=tcp:toport=22
32 sudo firewall-cmd --list-all