Linux: How to Open, Close, and Manage Ports with UFW Firewall
HardReset.InfoDecember 17, 20254 min33 views
10 connectionsΒ·12 entities in this videoβUnderstanding UFW (Uncomplicated Firewall)
- π‘ UFW stands for Uncomplicated Firewall, a command-line tool for managing firewall rules on Linux systems.
- π Administrative permissions are required to use UFW commands, necessitating the use of
sudo.
Enabling and Checking Firewall Status
- βοΈ To activate the firewall, use the command
sudo ufw enable. The firewall will also be enabled on system startup. - π You can verify the firewall's status by running
sudo ufw status. Initially, it might show as inactive by default.
Managing Network Ports with UFW
- πͺ To open a specific port, use
sudo ufw allowfollowed by the port number (e.g.,sudo ufw allow 22for SSH). - π You can also specify the protocol when allowing ports, such as
sudo ufw allow 80/tcpfor HTTP. - π« To block or deny a port, use
sudo ufw denyfollowed by the port number (e.g.,sudo ufw deny 443for HTTPS).
Advanced UFW Rule Management
- π’ To view all configured rules with their corresponding numbers, use
sudo ufw status numbered. - ποΈ Rules can be deleted by their number (e.g.,
sudo ufw delete [rule_number]) or by specifying the exact rule (e.g.,sudo ufw delete deny 443).
Disabling the Firewall
- π If you need to disable the firewall, use the command
sudo ufw disable. This will stop the firewall and disable it on system startup.
Knowledge graph12 entities Β· 10 connections
How they connect
An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.
Hover Β· drag to explore
12 entities
Chapters2 moments
Key Moments
Transcript17 segments
Full Transcript
Topics13 themes
Whatβs Discussed
UFWUncomplicated FirewallLinux FirewallPort ManagementNetwork SecuritySSHHTTPHTTPSTCPUDPCommand Line InterfaceUbuntuDebian
Smart Objects12 Β· 10 links
ConceptsΒ· 11
ProductΒ· 1