LinuxUFWFirewallPortsDebian
Install UFW
With UFW (Uncomplicated Firewall) you can manage ports on Linux easily.
sudo apt install ufwOpen and close ports
Open port (example 8080):
ufw allow 8080Close port:
ufw deny 8080- ufw status: Shows firewall status
- ufw enable: Enables the firewall
- ufw disable: Disables the firewall
- Important: Do not block port 22 (SSH) or you will lose access!
Was this post helpful?
MagicHosting – Hosting with real value
Hosting pays off with MagicHosting: fair pricing, current deals and reliable operation from Frankfurt. We offer servers, domains and personal support – no hidden costs.
- Current special sales with discounts on servers and packages
- Affordable domains with transparent pricing and great offers
- Powerful DDoS protection for maximum availability
- Personal support when you have questions or issues