LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-11-2015, 07:54 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
Nov 11 19:45:58 localhost.localdomain systemd[1]: Failed to start IPv4 firewall with


My box is Centos 7.1 x64 and I got this problem.

Quote:
[root@localhost ~]# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
[root@localhost ~]# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[root@localhost ~]# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
[root@localhost ~]# systemctl restart iptables
Job for iptables.service failed. See 'systemctl status iptables.service' and 'journalctl -xn' for details.
[root@localhost ~]# systemctl status iptables.service
iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled)
Active: failed (Result: exit-code) since Wed 2015-11-11 19:45:58 EST; 12s ago
Process: 3212 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=1/FAILURE)
Main PID: 3212 (code=exited, status=1/FAILURE)

Nov 11 19:45:58 localhost.localdomain systemd[1]: Starting IPv4 firewall with iptables...
Nov 11 19:45:58 localhost.localdomain iptables.init[3212]: iptables: Applying firewall rules: Bad argument `A'
Nov 11 19:45:58 localhost.localdomain iptables.init[3212]: Error occurred at line: 8
Nov 11 19:45:58 localhost.localdomain iptables.init[3212]: Try `iptables-restore -h' or 'iptables-restore --help' for ...ion.
Nov 11 19:45:58 localhost.localdomain iptables.init[3212]: [FAILED]
Nov 11 19:45:58 localhost.localdomain systemd[1]: iptables.service: main process exited, code=exited, status=1/FAILURE
Nov 11 19:45:58 localhost.localdomain systemd[1]: Failed to start IPv4 firewall with iptables.
Nov 11 19:45:58 localhost.localdomain systemd[1]: Unit iptables.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Any helpful comments would be highly appreciated.
Thanks in advance.
 
Old 11-11-2015, 11:18 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
The error messages include
  1. an important clue: the name of a file containing an error, even the line number
  2. a suggestion how to solve the problem

Edit: Point 2 only suggests to use the help option, but point 1 is worthwhile investigatimg.

Last edited by berndbausch; 11-12-2015 at 02:16 AM.
 
1 members found this post helpful.
Old 11-12-2015, 05:18 AM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
This is the iptables, whch I could not find error.

Quote:
# Generated by iptables-save v1.4.21 on Mon Nov 9 07:31:26 2015
*filter
:INPUT ACCEPT [5:292]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [3:228]
-A INPUT -p tcp -m tcp --dport 5900 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 5900 -j ACCEPT
A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
A INPUT -p tcp -m state --state NEW -m tcp --dport 5000:6000 -j ACCEPT
A INPUT -j REJECT --reject-with icmp-host-prohibited
A FORWARD -j REJECT --rejectwith icmp-host-prohibited
COMMIT
# Completed on Mon Nov 9 07:31:26 2015
 
Old 11-12-2015, 06:08 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by windstory View Post
This is the iptables, whch I could not find error.
Code:
-A OUTPUT -p tcp -m tcp --dport 5900 -j ACCEPT
A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
The first line is correct, the second one (line 8) isn't.
 
1 members found this post helpful.
Old 11-12-2015, 01:50 PM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
berndbausch/

I appreciate for your kindness.
 
Old 11-12-2015, 10:55 PM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
berndbausch/

Thakns a lot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] systemd[1]: Failed to start OpenBSD Secure Shell server during boot pan64 Linux - General 14 10-31-2015 06:14 AM
systemd[1]: Failed to start Load Kernel Modules. LateForLunch Linux - Software 1 07-06-2015 06:00 PM
entry in /etc/hosts file for localhost localhost.localdomain sureshpanchanathan Linux - Newbie 6 02-09-2012 09:10 PM
Mail from root@localhost.localdomain thru relay=localhost.localdomain[216.24.138.1] rshartog Linux - Server 2 02-02-2009 11:35 PM
MySQL: Why are there two roots localhost, and localhost.localdomain? paulsiu Linux - Server 6 04-18-2007 10:43 AM


All times are GMT -5. The time now is 09:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration