Skip to content

CalvinT57/aws-secure-linux-web-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Secure AWS EC2 Linux Web Server

This project demonstrates the deployment and configuration of a secure Linux based web server using Amazon EC2. The project includes instance deployment, security group configuration, Apache installation, Linux administration, and hosting a live webpage accessible through a public IPv4 address.

๐Ÿ“ธ Final Result

Final Server Verification

Deployed and secured a Linux-based web server on AWS EC2 using Apache, firewalld, and Fail2Ban.


๐Ÿ’ก Project Overview

In this project, I built and secured a cloud-hosted Linux web server using AWS EC2. After deploying the server, I configured network access with security groups, installed Apache to host a webpage, and added additional security controls including a Linux firewall and Fail2Ban.

This project demonstrates both infrastructure deployment and basic system hardening.

Skills Demonstrated

  • AWS EC2
  • Linux Administration
  • Apache Web Server
  • Security Groups
  • Networking Fundamentals
  • Cloud Infrastructure
  • Troubleshooting

๐Ÿ› ๏ธ Technologies Used

  • AWS EC2
  • Amazon Linux
  • Apache HTTP Server
  • SSH (Secure Shell)
  • Security Groups
  • firewalld (Linux firewall)
  • Fail2Ban (intrusion prevention)
  • Linux CLI

โš™๏ธ Deployment Walkthrough

Step 1: EC2 Dashboard

EC2 Dashboard


Step 2: Launch Instance

Launch Instance


Step 3: Select Amazon Linux

Amazon Linux


Step 4: Choose Instance Type

Instance Type


Step 5: Select Key Pair

Key Pair


Step 6: Configure Security Groups

Configured inbound rules:

  • SSH (port 22)
  • HTTP (port 80)
  • HTTPS (port 443)

Security Group


Step 7: Launch Success

Launch Success


Step 8: Instance Running

Instance Running


Step 9: Public IP Address

Public IP


Step 10: EC2 Connect

EC2 Connect


Step 11: Terminal Access

Terminal


๐Ÿง Linux Configuration

Step 12: Update System

Command: sudo yum update -y

System Update


Step 13: Install Apache

Command: sudo yum install httpd -y

Apache Installed


Step 14: Start Apache

Commands: sudo systemctl start httpd
sudo systemctl enable httpd

Apache Started


Step 15: Verify Apache

Command: sudo systemctl status httpd

Apache Status


Step 16: Test Web Server

Accessed via public IP in browser.

Browser Test


๐Ÿ” Security Hardening

Step 17: Install firewalld

Command: sudo yum install firewalld -y

Firewalld Installed


Step 18: Enable firewalld

Commands: sudo systemctl start firewalld
sudo systemctl enable firewalld

Firewalld Running


Step 19: Configure Firewall Rules

Commands: sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload

Firewall Rules


Step 20: Install Fail2Ban

Command: sudo yum install fail2ban -y

Fail2Ban Installed


Step 21: Enable Fail2Ban

Commands: sudo systemctl start fail2ban
sudo systemctl enable fail2ban

Fail2Ban Running


Step 22: Verify Fail2Ban

Command: sudo systemctl status fail2ban

Fail2Ban Status


โœ… Final Verification

Step 23: Confirm Services Running

Verified:

  • Apache running
  • firewalld active
  • Fail2Ban active
  • Website accessible

Final Verification


๐Ÿง  What I Learned

  • How to deploy cloud infrastructure using AWS EC2
  • How to configure secure remote access using SSH
  • How to install and manage Apache on Linux
  • How to configure a Linux firewall using firewalld
  • How Fail2Ban helps protect against unauthorized access attempts
  • How to validate a working and secured web server

๐Ÿ”ฎ Future Improvements

  • Add HTTPS using SSL/TLS
  • Configure domain name (Route 53)
  • Implement monitoring with CloudWatch
  • Automate deployment with Terraform

๐Ÿ“Œ Author

Calvin Trammell
https://github.com/CalvinT57
https://www.linkedin.com/in/calvin-trammell-56675295

About

Deployed and secured a Linux web server on AWS EC2 using Apache, security groups, and Linux administration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors