Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to Linux. In CentOS 6.3 I added this rule:

iptables -I INPUT -p udp --dport 9494 -j ACCEPT

Now I am trying to save it:

/sbin/service iptables save It gives me: [FAILED]

I tried to do: /sbin/service iptables stop but it gives me FAILED on unloading modules iptable_filter iptable_filter [FAILED]es

share|improve this question
"new to Linux" doesn't really fit the subject matter of Server Fault. unix is a better place when you're first starting out. – Andrew B Feb 27 '13 at 3:58
@AndrewB - that is absolutely inaccurate. Serverfault has no requirement that site users be of a certain skill level. The only requirement is that they are performing these duties as part of their profession. Even new linux admins are professionals. If you don't care to answer simple questions, than feel free to ignore them. – EEAA Feb 27 '13 at 4:08
@EEAA I apologize then, I appear to have picked up a false impression from watching others. The point is fair, there was nothing to indicate a home setting, so it was an inappropriate assumption. – Andrew B Feb 27 '13 at 4:15
@AndrewB - no problem. Lesson learned. – EEAA Feb 27 '13 at 4:17
up vote -1 down vote accepted

You run:

$ iptables-save > /path/to/file

That will store the current iptables rules in /path/to/file.

Then to re-load the rules:

$ iptables-restore < /path/to/file
share|improve this answer
Kudos for accepting the other answer. No hard feelings. – Andrew B Feb 27 '13 at 4:34

OK, I added rules to file /etc/sysconfig/iptables and it worked

share|improve this answer
If by "it worked" you mean "it still isn't automatically saving your tables but it's enough", then yes. That's not an answer to the question you posed though. – Andrew B Feb 27 '13 at 3:57
Well, I don't know what is good enough and what is not! If it works, it should be good? – Andrew Feb 27 '13 at 4:01
@AndrewB I think the OP is qualified to determine what answer truly answers his question. It's clear that he figured out how to solve the problem and then posted his solution. What's the problem with that? FWIW, I'm giving him a +1. – EEAA Feb 27 '13 at 4:10
@EEAA respect! Thank you for your help-- I have a lot to learn! – Andrew Feb 27 '13 at 4:12
@Andrew Right on. Don't let the naysayers get you down. We all started somewhere. Keep the questions coming! – EEAA Feb 27 '13 at 4:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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