What is UFW Firewall?
UFW (Uncomplicated Firewall) is the easy firewall tool on Ubuntu and many other Linux systems. It decides which incoming connections are allowed and blocks the rest.
How UFW Firewall works
-
1
A connection arrives
Something tries to reach a port.
-
2
Rules are checked
UFW looks for a matching allow or deny rule.
-
3
Allowed passes
Trusted services work normally.
-
4
Everything else stops
Default deny protects forgotten services.
What is a firewall?
A gatekeeper for network connections.
A safe first setup
- Deny incoming by default
- Allow only what you need (for example SSH and web)
- Allow SSH before enabling on a remote server
- Turn it on and check the status
UFW Firewall first steps
sudo ufw default deny incomingBlock incoming by default
sudo ufw allow OpenSSHKeep remote access
sudo ufw allow 443/tcpAllow secure web traffic
sudo ufw enableSwitch the firewall on
sudo ufw status verboseSee the rules
Use UFW Firewall safely and legally
On a remote server, add the SSH rule first or you may lock yourself out.
Practise only on your own computer, your own network or a lab that gives you permission. Using security tools on systems that are not yours can be a crime (in India under the IT Act).
UFW Firewall — common questions
What is UFW Firewall used for?
UFW (Uncomplicated Firewall) is the easy firewall tool on Ubuntu and many other Linux systems. It decides which incoming connections are allowed and blocks the rest.
Firewall kya hai?
Firewall network connections ka gatekeeper hai jo tay karta hai kaunsa connection aaye aur kaunsa nahi.
Does UFW replace antivirus?
No. They protect against different things; use updates and good passwords too.
How do I delete a rule?
Run sudo ufw status numbered, then sudo ufw delete <number>.
Related topics: ufw firewall tutorial · linux firewall · firewall kya hai · ubuntu security