iptables on CentOS7 fails to start with error on line 14

P

postcd

Guest
Hello, i have CentOS 7 on a OpenVZ VPS and i see iptables is somehow failing to start:

Jan 06 22:06:09 name iptables.init[111]: iptables: Applying firewall rules: iptables-restore: line 14 failed

This is /etc/sysconfig/iptables

# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

I tried to import it: iptables-restore < /etc/sysconfig/iptables

Please where is the problem and how can i fix it?

----
update: command "service iptables save" made it working/starting i belive. It might be needed to disable firewalld and enable iptables on centos7 (google it)
 
Last edited:


Hello, i have CentOS 7 on a OpenVZ VPS and i see iptables is somehow failing to start:



This is /etc/sysconfig/iptables



I tried to import it: iptables-restore < /etc/sysconfig/iptables

Please where is the problem and how can i fix it?

----
update: command "service iptables save" made it working/starting i belive. It might be needed to disable firewalld and enable iptables on centos7 (google it)
Well, then..... :3 It's good to see that you solved it.... :) It always feels good when you solve a problem that was bugging you, doesn't it......? :D
 

Members online


Top