What is UFW?
UFW (Uncomplicated Firewall) is the default, user-friendly frontend for managing iptables (the core firewall software) on Ubuntu. It is designed to make it easy to block or allow network traffic. By default, when UFW is enabled, it follows a strict “deny all incoming, allow all outgoing” policy.
If you are running a laptop that frequently connects to public Wi-Fi, UFW is essential for keeping hackers out. However, if you are running a desktop PC or a home server that is permanently connected via Ethernet to a highly secure, private internal network (behind a strong hardware router/firewall), running a secondary software firewall on the machine itself can cause unnecessary headaches. It can silently block file sharing (Samba), media streaming (Plex), or SSH access, forcing you to constantly write new rules. In a completely trusted internal network, you can safely disable UFW.
How to Disable UFW in Ubuntu
You can turn off the Uncomplicated Firewall entirely using a single terminal command.
- Open your Ubuntu Terminal (shortcut:
Ctrl + Alt + T). - First, check the current status of the firewall:
sudo ufw status
- If the terminal outputs “Status: active”, proceed to disable it:
sudo ufw disable
- The terminal should respond with “Firewall stopped and disabled on system startup.”
Should I uninstall the package?
No, it is highly recommended to leave the ufw package installed on your system. Disabling it is sufficient to stop it from blocking your internal network traffic. By keeping the package installed, you retain the ability to instantly re-enable it (sudo ufw enable) if you ever move the machine to a less secure network environment.