TechKnowSurge
VideoSecurityFree

Hardening - Close Unused Ports and Protocols

Network ports act as virtual connection points on a machine, and leaving unused ports open creates unnecessary vulnerabilities that attackers can exploit. Reducing the attack surface means identifying and closing any port or protocol that is not actively in use.

Complete this video to capture a CTF flag worth 1 point.

About this video

Network ports are virtual connection points assigned to specific services running on a machine. When a server hosts multiple services — a web server, a list server, a streaming service — each one is bound to a distinct port number, allowing clients to target the correct service during a connection. Common examples include port 80 and 443 for web traffic, while proprietary or custom services may occupy higher-numbered ports. Each open port is effectively an access point into the system, and the more that exist, the larger the potential attack surface. Securing a machine requires a deliberate audit of which ports and protocols are actually in use. Any port tied to a service that is inactive, unnecessary, or no longer deployed should be closed. This principle of reducing open ports and disabling unused protocols is a foundational hardening practice, limiting the opportunities an attacker has to probe or exploit the system. The fewer access points a machine exposes, the more defensible its network posture becomes.

What you'll learn

What's covered

Securing Ports and Protocols

Key terms

Port
A logical endpoint for communication in a network, identified by a number that specifies a particular service or application.
Protocol
A set of rules governing the format and transmission of data between devices.
Attack Surface
The total set of points in a system where an unauthorized user can attempt to enter or extract data.
File Transfer Protocol
FTP
A standard network protocol used to transfer files between a client and a server over a TCP network.
Port Scanning
A technique used to discover open ports and services available on a networked device.
Firewall
A network security device that monitors and controls incoming and outgoing traffic based on predefined security rules.
Server
A computer or program that provides services or resources to other devices, known as clients, over a network.
Transport Layer Security
TLS
A cryptographic protocol that provides secure communication over a network, successor to SSL.
Hardening
The process of securing a system by reducing its attack surface — disabling unnecessary services, applying configuration best practices, removing default credentials, and keeping software patched. Hardened systems offer fewer opportunities for exploitation.

Topics

Network Hardening Attack Surface Reduction Network Ports Firewalls Protocols Network Security

Transcript

When one machine is connecting to another machine, it's connecting to a port, or it's using a protocol. What we want to do is make sure that a machine is secure. The more ports and protocols that are open, the more chances that those could be leveraged. So we want to turn off any unused ports or protocols.

Network ports

Network ports are virtual ports that are set up on a machine that you can make connections to. So here we have a server right here and it's hosting out a web server, so www, and then a couple other services. Those clients are accessing those services on this server. We have maybe some sort of app that's utilizing these services. Well, it needs to address each one of those services, so we have a port that's associated with those services.

So for instance, www might be port 80 or 443. We have a list server right here, so maybe that's 20, using port 201101. And this is a streaming, maybe it's using port 21102. And so we've got these different ports, and the client then will connect into these different ports, or be sending from these ports.

Closing unused ports

So whatever the case may be, these ports are like open holes on this server. What we want to do is minimize how many holes we have on a server. In order to do that, we need to close the ports of any port that we're not using.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →