In Ubuntu 16.04, can we install firewalld services?


1 Answer 1


To switch do the following:

  1. Stop iptables if in use:

    sudo systemctl stop iptables
  2. Make sure iptables are not used by your system anymore:

    sudo systemctl mask iptables
  3. Check its status:

    sudo systemctl status iptables
  4. Remove UFW if installed:

    sudo apt-get remove ufw

Firewalld - Dynamic Firewall Manager

This replaces iptable as the preferred way to manage your firewall. Commands to use with firewalld includes:

  1. Install firewalld:

    sudo apt install firewalld
  2. Check its status:

    sudo systemctl status firewalld
  3. Enable or disable firewalld:

    sudo systemctl [enable | disable ] firewalld
  4. Starting and stoping it:

    sudo systemctl [ start | stop ] firewalld

So to use it is simply to enable it as in steps 2, then use the man pages to get more information.

See here for more information on how to use firewalld

  • You left out "apt install firewalld" in the Firewalld section - it's not included in Ubuntu 16.04 by default Apr 7, 2018 at 4:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.