• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    Why iptables and firewalld cannot be activated

    My vps is centos 7 and after I typing this line:

    $sudo systemctl status iptables.service -l

    messages showed below:

    ● iptables.service - IPv4 firewall with iptables
    Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Sun 2018-07-29 09:54:48 UTC; 53s ago
    Process: 119 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=1/FAILURE)
    Main PID: 119 (code=exited, status=1/FAILURE)

    Jul 29 09:33:59 localhost.localdomain iptables.init[122]: iptables: Applying firewall rules: iptables-restore: line 14 failed
    Jul 29 09:33:59 localhost.localdomain iptables.init[122]: [FAILED]
    Jul 29 09:54:48 *** iptables.init[119]: iptables: Applying firewall rules: iptables-restore: line 14 failed
    Jul 29 09:54:48 *** iptables.init[119]: [FAILED]

    The firewalld cannot be started too.

     

    How to solve the problems. Please just do it.

     

    1 ACCEPTED SOLUTION
    Employee

    @gpontop,

    Most likely there is an iptable table or chain that has been applied causing a conflict to the startup of the firewall. The best option is to delete custom rule by removing it. Here is a link to the iptable commands: https://linux.die.net/man/8/iptables. Here is another link to an article for an option to uninstall and reinstall the iptables (this will be for centOS): https://www.centos.org/forums/viewtopic.php?t=40889. 

    JessicaP

    View solution in original post

    1 REPLY 1
    Employee

    @gpontop,

    Most likely there is an iptable table or chain that has been applied causing a conflict to the startup of the firewall. The best option is to delete custom rule by removing it. Here is a link to the iptable commands: https://linux.die.net/man/8/iptables. Here is another link to an article for an option to uninstall and reinstall the iptables (this will be for centOS): https://www.centos.org/forums/viewtopic.php?t=40889. 

    JessicaP

    View solution in original post