Failed to restart iptables.service: Unit not found

Created:

2017-07-27 22:28:00 UTC

Modified:

2017-08-08 13:12:14 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Failed to restart iptables.service: Unit not found

Symptoms

  • Failed to manage iptables using cli:
# service iptables restart
Redirecting to /bin/systemctl restart iptables.service Failed to restart iptables.service: Unit not found.
  • Firewalld service is installed and enabled:
# service firewalld status
Redirecting to /bin/systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2017-07-28 12:00:00 AEST; 16min ago
Docs: man:firewalld(1)
Main PID: 486 (firewalld)
Memory: 22.4M
CGroup: /system.slice/firewalld.service
486 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Cause

Firewalld is managing the iptables, so iptables has no its own unit.

Resolution

As a workaround install Plesk Firewall extension. It allows firewall rules management through the graphical interface.

  1. Connect to the server using SSH.
  2. Stop and disable firewalld applications with the following commands:
    # systemctl stop firewalld
    # systemctl disable firewalld
  3. Install Plesk Firewall extension in Tools & Settings > Updates and Upgrades > Add/Remove Components > Plesk extensions > Plesk Firewall :
    install.PNG
  4. After installation the extension can be found in Tools & Settings > Firewall:
    firewall.PNG
Have more questions? Submit a request
Please sign in to leave a comment.