All categories

// linux-security

Linux Security & Networking Projects

Firewall fundamentals, web service and file permission hardening, traffic filtering, network security, and high-availability infrastructure in controlled labs.

Linux Firewall Fundamentals

Practiced Linux traffic filtering with iptables, focusing on chains, rule ordering, and the distinction between firewall policy and listening services.

LinuxiptablesFirewall RulesTraffic Filtering

Lab work

  • Inspected firewall chains and rules; filtered traffic by protocol, source IP address, and destination port.
  • Applied ACCEPT and DROP actions using INPUT and OUTPUT chains.
  • Explored rule ordering and the difference between a firewall rule and a service listening on a port.

High Availability, Load Balancing & Network Security

Configured pfSense network controls and built Linux lab environments with HAProxy and Keepalived for traffic distribution and failover.

LinuxpfSenseHAProxyKeepalivedNATVPN

Lab work

  • Configured pfSense firewall policies, NAT rules, and VPN tunnels.
  • Built high-availability load-balancing environments with HAProxy and Keepalived, covering traffic distribution, SSL termination, and failover.
  • Documented network architecture, service configurations, and troubleshooting procedures.

Linux Web Server & File Permission Hardening

Completed

Practical DevSecOps hardening on a Linux web host: removed unnecessary information exposure and overly broad file permissions left behind by a content rollout, a troubleshooting session, and post-support work — without breaking normal content delivery.

LinuxWeb Server HardeningDirectory ListingInformation DisclosureFile PermissionsLeast PrivilegeService RestartDevSecOps

Challenge 1 — Browsable directory listing

  • Handled a realistic web hardening cleanup after a content rollout: the web server published a browsable directory listing that exposed the site's directory structure as an index.
  • Disabled the directory listing so the structure is no longer published, then restarted the service through the existing helper script rather than ad-hoc commands.
  • Verified that legitimate file delivery still worked after the change, confirming visitors can still reach normal site content.
  • Outcome: the site remains useful to visitors, but the directory structure is no longer exposed as an index.

Challenge 2 — Sensitive backup archive in the web root

  • Cleaned up a realistic post-troubleshooting exposure on a Linux web host: a sensitive backup archive had been left inside the public web root.
  • Identified the archive and moved it into private storage, outside the web server's published document boundary.
  • Verified that the public site still worked after the move, so normal content delivery was not disrupted.
  • Outcome: the backup data is preserved, but it no longer sits inside the web server's published document boundary.

Challenge 3 — Secret file readable by unrelated users

  • Corrected a realistic post-support permission drift on a Linux host: a secret file had been left readable by local users who had no need for it.
  • Tightened the permissions on the secret file and removed the unnecessary read access.
  • Verified that the application still worked, so restoring least privilege did not break the service that depends on the secret.
  • Outcome: the secret remains available to the service boundary that needs it, while unrelated local users lose read access.

Challenge 4 — World-writable uploads directory

  • Cleaned up a realistic post-troubleshooting permission problem on a Linux web application: the uploads directory had been left world-writable.
  • Removed world-write access from the uploads directory while preserving the application's own write path.
  • Confirmed the web content still worked after the change, keeping required application writes intact.
  • Outcome: the upload path remains usable by the application role, but it is no longer writable by every local user.

Hardening approach

  • Treated every task the same way: reduce unnecessary exposure — what the server does not need to publish, and what local users do not need to read or write.
  • Restored least privilege instead of disabling features, keeping legitimate content delivery and required application writes available.
  • Confirmed service state, file delivery, and application behaviour after every change, so hardening never turned into an outage.
  • Documented the before-and-after state of each task to keep the cleanup repeatable and reviewable.